結果
問題 |
No.3108 Luke or Bishop
|
ユーザー |
|
提出日時 | 2025-04-20 14:05:50 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 3,776 bytes |
コンパイル時間 | 2,069 ms |
コンパイル使用メモリ | 193,048 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-04-20 14:05:53 |
合計ジャッジ時間 | 2,945 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 26 |
ソースコード
/* nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn E 3 E Koalas are the CUTEST animals. 3 E 3 uuuuuuuuuuuuuuuuuuuuuuuu uuuuuuu | / |/ `-^'-';-. .":^_"":;;^'``...`.-;;":, _- .__- __~^ '___ '~-_'^^,_, G .^^`~^~ ._ ^__"` S v _!- "_~- '^' ."` \` w _^ ,! .+ "_ ..!`^ _. ,^ = = `= `< = _^ '" `" 1 > _ 1 ^; / r ,; < 1 ! `_ \ = X ! -' 4 ": _` 5 ., ,3y_ = 4 o ';_ "_ v -Tt' = 4 ^.'_,` ,\ 6 \ ~##v E 5 5 + +1` 1 ! v ~. , ` = \` E u +! =+ ` ', "` -` "' "+++++. + `\ ` ! '- ^" `!_ ."-` '" ^ ^ ^". .^-": !- ? ! + .__":_ ._-_,,_` - ^ = ,":_":":_.^^^_,'..-_^^^^_.,~_--__'__ < = + `" ". `\ !. ` */ #include<bits/stdc++.h> using namespace std; using lnln = long long; using veci = vector<int>; //二次元はvector<veci>で我慢 using vecl = vector<long long>; using vecs = vector<string>; using vecb = vector<bool>; #define repe(i,n) for(int i = 0; i < (n); ++i) //ただのfor #define eper(i,n) for(int i = (n)-1; i >= 0; --i) //逆からfor #define been(a) a.begin(),a.end() //sort(been(A))とかできる #define neeb(a) a.rbegin(),a.rend() //逆からそれ #define chax(a,b) a = max(a,b) //answの更新とかに #define chin(a,b) a = min(a,b) //上に同じく #define outY cout << "Yes\n" //出力さぼれて嬉しい(要セミコロン) #define outN cout << "No\n" //上に #define outM cout << "-1\n" //上に #define outA(n) cout << (n) << "\n" //上のやつの汎用化した int yonx[] = {0,1,0,-1}, yony[] = {-1,0,1,0}; //12時から時計回り四近傍 int hatx[] = {0,1,1,1,0,-1,-1,-1}, haty[] = {-1,-1,0,1,1,1,0,-1}; //八近傍 #ifdef __LOCAL //dbgn() -> 改行区切り #define dbgn(N) cout << (N) << "\n"; #else #define dbgn(N); #endif #ifdef __LOCAL //dbgs() -> 空白区切り #define dbgs(N) cout << (N) << " "; #else #define dbgs(N); #endif int main(void) { int Gx, Gy; cin >> Gx >> Gy; if(!Gx and !Gy) cout << "0\n"; else if(abs(Gx) == abs(Gy) or !Gx or !Gy) cout << "1\n"; else cout << "2\n"; return 0; }