結果

問題 No.3108 Luke or Bishop
ユーザー Аян Дауренбек
提出日時 2025-04-18 20:27:08
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 379 bytes
コンパイル時間 858 ms
コンパイル使用メモリ 77,184 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-04-18 20:27:11
合計ジャッジ時間 1,830 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 16 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;

int main() {
    long long Gx, Gy;
    cin >> Gx >> Gy;

    if (Gx == 0 && Gy == 0) {
        cout << 0 << endl;
    }
    else if (Gx == Gy || Gx == -Gy) {
        cout << 1 << endl;
    }
    else if ((Gx + Gy) % 2 == 0) {
        cout << 2 << endl;
    }
    else {
        cout << 2 << endl;
    }

    return 0;
}
0