結果

問題 No.1716 Bonus Nim
ユーザー square1001
提出日時 2021-10-22 23:23:47
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 433 bytes
コンパイル時間 603 ms
コンパイル使用メモリ 63,616 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-23 07:54:04
合計ジャッジ時間 3,149 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
uint64_t xorshift64(uint64_t seed) {
	seed ^= seed << 13;
	seed ^= seed >> 7;
	seed ^= seed << 17;
	return seed;
}
int main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	int Q;
	cin >> Q;
	while (Q--) {
		int N;
		cin >> N;
		uint64_t h = 0;
		for (int i = 0; i < N; ++i) {
			int a;
			cin >> a;
			h ^= xorshift64(a);
		}
		cout << (h != 0 ? "Alice" : "Bob") << '\n';
	}
	return 0;
}
0