結果

問題 No.1716 Bonus Nim
ユーザー tamatotamato
提出日時 2021-10-22 21:35:41
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 457 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 82,084 KB
実行使用メモリ 131,396 KB
最終ジャッジ日時 2023-10-24 12:32:41
合計ジャッジ時間 4,278 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,688 KB
testcase_01 AC 37 ms
53,688 KB
testcase_02 AC 37 ms
53,688 KB
testcase_03 AC 36 ms
53,688 KB
testcase_04 AC 122 ms
108,976 KB
testcase_05 AC 130 ms
114,572 KB
testcase_06 AC 126 ms
110,644 KB
testcase_07 AC 123 ms
104,824 KB
testcase_08 AC 122 ms
110,680 KB
testcase_09 AC 129 ms
107,316 KB
testcase_10 AC 120 ms
109,288 KB
testcase_11 AC 127 ms
107,396 KB
testcase_12 AC 122 ms
106,944 KB
testcase_13 AC 140 ms
131,396 KB
testcase_14 AC 129 ms
119,724 KB
testcase_15 AC 174 ms
76,948 KB
testcase_16 WA -
testcase_17 AC 34 ms
53,688 KB
testcase_18 AC 35 ms
53,688 KB
testcase_19 WA -
testcase_20 AC 34 ms
53,688 KB
testcase_21 WA -
testcase_22 AC 134 ms
120,340 KB
testcase_23 AC 132 ms
117,636 KB
testcase_24 AC 122 ms
116,408 KB
testcase_25 AC 139 ms
131,388 KB
testcase_26 AC 134 ms
119,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    for _ in range(int(input())):
        N = int(input())
        A = list(map(int, input().split()))

        if N & 1:
            print("Alice")
        else:
            g = 0
            for a in A:
                g ^= a-1
            if g:
                print("Alice")
            else:
                print("Bob")


if __name__ == '__main__':
    main()
0