結果

問題 No.1716 Bonus Nim
ユーザー tassei903tassei903
提出日時 2021-10-22 21:47:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 601 bytes
コンパイル時間 174 ms
コンパイル使用メモリ 81,640 KB
実行使用メモリ 133,224 KB
最終ジャッジ日時 2023-10-24 12:51:22
合計ジャッジ時間 4,448 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 37 ms
53,332 KB
testcase_02 AC 38 ms
53,332 KB
testcase_03 AC 37 ms
53,332 KB
testcase_04 AC 128 ms
112,180 KB
testcase_05 AC 132 ms
115,740 KB
testcase_06 AC 128 ms
113,952 KB
testcase_07 AC 123 ms
106,448 KB
testcase_08 AC 124 ms
112,516 KB
testcase_09 AC 129 ms
109,476 KB
testcase_10 AC 125 ms
111,268 KB
testcase_11 AC 129 ms
110,096 KB
testcase_12 AC 125 ms
108,720 KB
testcase_13 AC 148 ms
132,740 KB
testcase_14 AC 134 ms
121,588 KB
testcase_15 AC 195 ms
76,468 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 #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
sys.setrecursionlimit(10**7)
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
t = ni()
for _ in range(t):
    n = ni()
    a = na()
    if n%2:
        print("Alice")
        continue
    z = 0
    for i in range(n):
        z^=a[i]
    if z:
        print("Alice")
    else:
        print("Bob")
0