結果
問題 | No.2476 Knight Game |
ユーザー |
![]() |
提出日時 | 2023-09-06 11:40:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 619 bytes |
コンパイル時間 | 1,981 ms |
コンパイル使用メモリ | 192,092 KB |
最終ジャッジ日時 | 2025-02-16 19:02:28 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | WA * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; void solve() { int h, w, x, y; cin >> h >> w >> x >> y; if(h > w) { swap(h, w); swap(x, y); } if(h == 1) { cout << "Bob\n"; return; } if(h == 2) { int lmv = (y - 1) / 2; int rmv = (w - y) / 2; if(lmv % 2 or rmv % 2) cout << "Alice\n"; else cout << "Bob\n"; return; } if(h == 3 and w == 3) { if(x == 2 and y == 2) { cout << "Bob\n"; } else { cout << "Alice\n"; } return; } if(h % 2 == 0 or w % 2 == 0) { cout << "Alice\n"; } else { cout << "Bob\n"; } return; } int main() { int t; cin >> t; while(t--) solve(); }