結果

問題 No.1716 Bonus Nim
ユーザー 沙耶花沙耶花
提出日時 2021-10-22 22:00:35
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 540 bytes
コンパイル時間 4,421 ms
コンパイル使用メモリ 262,696 KB
実行使用メモリ 4,600 KB
最終ジャッジ日時 2023-10-24 13:08:24
合計ジャッジ時間 9,313 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 1 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 200 ms
4,348 KB
testcase_05 AC 200 ms
4,600 KB
testcase_06 AC 197 ms
4,348 KB
testcase_07 AC 197 ms
4,580 KB
testcase_08 AC 197 ms
4,348 KB
testcase_09 AC 199 ms
4,348 KB
testcase_10 AC 199 ms
4,348 KB
testcase_11 AC 198 ms
4,348 KB
testcase_12 AC 197 ms
4,348 KB
testcase_13 AC 198 ms
4,516 KB
testcase_14 AC 199 ms
4,348 KB
testcase_15 AC 349 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>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf 1000000000


int main(){
	
	int _t;
	cin>>_t;
	
	rep(_,_t){
		int N;
		cin>>N;
		int X = 0;
		vector<int> a(N);
		rep(i,N)cin>>a[i];
		
		
		rep(i,N)X ^= a[i];
		
		bool f = true;
		if(X==0)f = false;
		
		if(N%2==1)f = true;
		rep(i,N){
			//if(a[i]==X)f ^= 1;
		}
		
		if(f)cout<<"Alice"<<endl;
		else cout<<"Bob"<<endl;
	}
	return 0;
}
0