結果

問題 No.2476 Knight Game
ユーザー nok0nok0
提出日時 2023-09-06 11:40:20
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 619 bytes
コンパイル時間 2,040 ms
コンパイル使用メモリ 197,908 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-15 22:30:12
合計ジャッジ時間 6,131 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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();
}
0