結果

問題 No.1716 Bonus Nim
ユーザー ぷら
提出日時 2021-10-22 22:17:07
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 421 bytes
コンパイル時間 2,091 ms
コンパイル使用メモリ 191,576 KB
最終ジャッジ日時 2025-01-25 03:51:00
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 1 WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    int t;
    cin >> t;
    while (t--) {
        int N;
        cin >> N;
        int x = 0,f = 0;
        for(int i = 0; i < N; i++) {
            int A;
            cin >> A;
            x ^= A-1;
        }
        if(N%2 || (x != 0 && f)) {
            cout << "Alice" << endl;
        }
        else {
            cout << "Bob" << endl;
        }
    }
}
0