結果

問題 No.2813 Cookie
ユーザー hato336
提出日時 2024-07-20 13:16:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 551 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 81,952 KB
実行使用メモリ 90,372 KB
最終ジャッジ日時 2024-07-20 13:17:06
合計ジャッジ時間 6,441 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections,sys,math,functools,operator,itertools,bisect,heapq,decimal,string,time,random
#sys.setrecursionlimit(10**9)
#sys.set_int_max_str_digits(0)
#input = sys.stdin.readline
#n = int(input())
#
#alist = []
#s = input()

input = sys.stdin.readline
t = int(input())
for i in range(t):
    n = int(input())
    a = list(map(int,input().split()))
    cnt = 0
    for j in a:
        cnt ^= ([0,1,1,2,2][j]) if j <= 4 else ((j - 5)//3 * 4 + 4 + (2 if (j-5)%3 == 2 else 0))
    if cnt == 0:
        print('Bob')
    else:
        print('Alice')
0