結果

問題 No.1506 Unbalanced Pocky Game
ユーザー mkawa2mkawa2
提出日時 2021-05-14 22:51:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 1,070 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 28,308 KB
最終ジャッジ日時 2024-04-10 01:58:47
合計ジャッジ時間 4,854 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
17,820 KB
testcase_01 AC 26 ms
10,752 KB
testcase_02 AC 28 ms
10,624 KB
testcase_03 AC 32 ms
11,904 KB
testcase_04 AC 91 ms
24,620 KB
testcase_05 AC 94 ms
27,212 KB
testcase_06 AC 65 ms
20,504 KB
testcase_07 AC 59 ms
17,628 KB
testcase_08 AC 67 ms
20,916 KB
testcase_09 AC 95 ms
27,900 KB
testcase_10 AC 99 ms
28,308 KB
testcase_11 AC 56 ms
17,900 KB
testcase_12 AC 53 ms
17,208 KB
testcase_13 TLE -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

sys.setrecursionlimit(10**6)
int1 = lambda x: int(x)-1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.buffer.readline())
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def LI1(): return list(map(int1, sys.stdin.buffer.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
def BI(): return sys.stdin.buffer.readline().rstrip()
def SI(): return sys.stdin.buffer.readline().rstrip().decode()
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0)]
# dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)]
dij = [(0, 1), (1, 0), (1, 1), (1, -1)]
inf = 10**16
md = 998244353
# md = 10**9+7

def win():
    if len(aa)==1:return True
    a=aa[-1]
    aa.pop()
    ret=win()
    aa.append(a)
    if not ret:return True
    if a==2:
        aa[-1]=1
        ret=win()
        aa[-1]=2
        if not ret:return True
    return False

n=II()
aa=LI()
aa=[1 if a==1 else 2 for a in aa]

print("Alice" if win() else "Bob")
0