結果
問題 |
No.3108 Luke or Bishop
|
ユーザー |
![]() |
提出日時 | 2025-08-26 01:12:02 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 463 bytes |
コンパイル時間 | 2,782 ms |
コンパイル使用メモリ | 275,316 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-08-26 01:12:07 |
合計ジャッジ時間 | 4,318 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
#include <bits/stdc++.h> //#include <atcoder/modint> using namespace std; //using namespace atcoder; using ll = long long; //using mint = modint998244353; int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int gx, gy; cin >> gx >> gy; if (gx == 0 && gy == 0) cout << 0 << endl; else if (abs(gx) == abs(gy)) cout << 1 << endl; else if (gx == 0 || gy == 0) cout << 1 << endl; else cout << 2 << endl; return 0; }