結果
| 問題 | No.1716 Bonus Nim | 
| コンテスト | |
| ユーザー |  noetherian_ring | 
| 提出日時 | 2021-10-22 22:43:01 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 243 ms / 2,000 ms | 
| コード長 | 799 bytes | 
| コンパイル時間 | 231 ms | 
| コンパイル使用メモリ | 82,244 KB | 
| 実行使用メモリ | 149,212 KB | 
| 最終ジャッジ日時 | 2024-09-23 06:26:08 | 
| 合計ジャッジ時間 | 5,570 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 26 | 
ソースコード
import sys
import os
sys.setrecursionlimit(100000)
is_local = "TERM_PROGRAM" in os.environ
input = sys.stdin.readline
INF = float('inf')
MOD = 998244353
def debug(*args, **kwargs):
    if is_local:
        print(*args, **kwargs)
def I(): return input().rstrip()
def IS(): return input().split()
def II(): return int(input())
def IIS(): return map(int, input().split())
def LIIS(): return list(map(int, input().split()))
def main():
    q = II()
    from collections import Counter
    for _ in range(q):
        n = II()
        va = LIIS()
        if len(va) % 2:
            print("Alice")
            continue
        cnt = Counter(va)
        if all(v % 2 == 0 for v in cnt.values()):
            print("Bob")
        else:
            print("Alice")
if __name__ == "__main__":
    main()
            
            
            
        