結果
| 問題 |
No.3108 Luke or Bishop
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-18 20:10:42 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 607 bytes |
| コンパイル時間 | 1,945 ms |
| コンパイル使用メモリ | 193,724 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2025-04-18 20:10:46 |
| 合計ジャッジ時間 | 3,159 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 26 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/dsu>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define f(i,a,b) for(int i=a;i<=b;i++)
#define rf(i,a,b) for(int i=a;i>=b;i--)
using ll = long long;
using ld = long double;
using vi= vector<int>;
using vvi= vector<vi>;
using vs= vector<string>;
using pii= pair<int, int>;
using vpii= vector<pii>;
#define endl '\n'
int main(void){
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll x, y;
cin >> x >> y;
if(x == 0 && y == 0)cout << 0 << endl;
else if(abs(x) == abs(y)|| x == 0 || y == 0)cout << 1 << endl;
else cout << 2 << endl;
}