結果

問題 No.1412 Super Ryuo
ユーザー oooooba
提出日時 2021-07-14 21:06:34
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 1,190 ms
コンパイル使用メモリ 112,820 KB
最終ジャッジ日時 2025-01-23 01:03:15
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <array>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <optional>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

int main() {
    int64_t a, b, c, d;
    cin >> a >> b >> c >> d;
    int32_t ans;
    if (a == c || b == d || (abs(a - c) + abs(b - d) <= 3))
        ans = 1;
    else
        ans = 2;
    cout << ans << endl;
    return 0;
}
0