結果

問題 No.1716 Bonus Nim
ユーザー zkouzkou
提出日時 2021-09-24 22:52:48
言語 PyPy3
(7.3.15)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 295 bytes
コンパイル時間 351 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 133,300 KB
最終ジャッジ日時 2023-10-24 11:29:50
合計ジャッジ時間 5,157 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,536 KB
testcase_01 AC 35 ms
53,536 KB
testcase_02 AC 34 ms
53,536 KB
testcase_03 AC 35 ms
53,536 KB
testcase_04 AC 127 ms
111,632 KB
testcase_05 AC 127 ms
115,588 KB
testcase_06 AC 123 ms
114,140 KB
testcase_07 AC 123 ms
106,496 KB
testcase_08 AC 127 ms
112,600 KB
testcase_09 AC 137 ms
109,624 KB
testcase_10 AC 130 ms
111,436 KB
testcase_11 AC 131 ms
109,640 KB
testcase_12 AC 124 ms
108,928 KB
testcase_13 AC 149 ms
132,912 KB
testcase_14 AC 136 ms
121,536 KB
testcase_15 AC 595 ms
77,100 KB
testcase_16 WA -
testcase_17 AC 36 ms
53,536 KB
testcase_18 AC 35 ms
53,536 KB
testcase_19 WA -
testcase_20 AC 36 ms
53,536 KB
testcase_21 WA -
testcase_22 AC 137 ms
122,016 KB
testcase_23 AC 137 ms
120,700 KB
testcase_24 AC 128 ms
116,976 KB
testcase_25 AC 144 ms
133,300 KB
testcase_26 AC 137 ms
121,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    N = int(input())
    As = list(map(int, input().split()))
    if N % 2 == 1:
        print("Alice")
    else:
        nim = 0
        for A in As:
            nim ^= (A - 1)
        if nim:
            print("Alice")
        else:
            print("Bob")
0