結果

問題 No.1716 Bonus Nim
ユーザー publflpublfl
提出日時 2021-10-22 23:40:43
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 321 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 31,552 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-24 15:53:43
合計ジャッジ時間 2,847 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 65 ms
4,348 KB
testcase_05 AC 64 ms
4,348 KB
testcase_06 AC 65 ms
4,348 KB
testcase_07 AC 66 ms
4,348 KB
testcase_08 AC 66 ms
4,348 KB
testcase_09 AC 64 ms
4,348 KB
testcase_10 AC 65 ms
4,348 KB
testcase_11 AC 65 ms
4,348 KB
testcase_12 AC 66 ms
4,348 KB
testcase_13 AC 65 ms
4,348 KB
testcase_14 AC 66 ms
4,348 KB
testcase_15 AC 52 ms
4,348 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>

int x[200010];
int main()
{
	int T;
	scanf("%d",&T);
	while(T--)
	{
		int a;
		scanf("%d",&a);
		for(int i=1;i<=a;i++) scanf("%d",&x[i]);
		if(a%2==1) printf("Alice\n");
		else
		{
			int ans = 0;
			for(int i=1;i<=a;i++) ans ^= x[i];
			if(ans==0) printf("Bob\n");
			else printf("Alice\n");
		}
	}
}
0