結果

問題 No.1716 Bonus Nim
ユーザー wolgnikwolgnik
提出日時 2021-10-22 22:48:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 250 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 131,428 KB
最終ジャッジ日時 2023-10-24 14:11:52
合計ジャッジ時間 4,367 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,480 KB
testcase_01 AC 36 ms
53,480 KB
testcase_02 AC 39 ms
53,480 KB
testcase_03 AC 38 ms
53,480 KB
testcase_04 AC 123 ms
108,976 KB
testcase_05 AC 130 ms
114,544 KB
testcase_06 AC 130 ms
110,588 KB
testcase_07 AC 123 ms
104,872 KB
testcase_08 AC 122 ms
110,664 KB
testcase_09 AC 131 ms
107,344 KB
testcase_10 AC 122 ms
109,272 KB
testcase_11 AC 129 ms
107,392 KB
testcase_12 AC 129 ms
106,928 KB
testcase_13 AC 143 ms
129,916 KB
testcase_14 AC 131 ms
119,508 KB
testcase_15 AC 185 ms
76,676 KB
testcase_16 WA -
testcase_17 AC 36 ms
53,484 KB
testcase_18 AC 36 ms
53,484 KB
testcase_19 WA -
testcase_20 AC 36 ms
53,484 KB
testcase_21 WA -
testcase_22 AC 135 ms
118,908 KB
testcase_23 AC 132 ms
117,692 KB
testcase_24 AC 123 ms
114,404 KB
testcase_25 AC 142 ms
131,428 KB
testcase_26 AC 134 ms
117,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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:
    nim = 0
    for x in a: nim ^= x - 1
    if nim: print("Alice")
    else: print("Bob")
0