結果

問題 No.1506 Unbalanced Pocky Game
ユーザー marroncastlemarroncastle
提出日時 2021-05-14 22:31:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 82,552 KB
実行使用メモリ 110,884 KB
最終ジャッジ日時 2024-04-10 01:03:58
合計ジャッジ時間 7,844 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,100 KB
testcase_01 AC 38 ms
52,864 KB
testcase_02 AC 37 ms
52,984 KB
testcase_03 AC 56 ms
70,052 KB
testcase_04 AC 107 ms
102,176 KB
testcase_05 AC 112 ms
103,848 KB
testcase_06 AC 90 ms
95,684 KB
testcase_07 AC 79 ms
88,952 KB
testcase_08 AC 92 ms
95,812 KB
testcase_09 AC 110 ms
103,936 KB
testcase_10 AC 113 ms
106,004 KB
testcase_11 AC 81 ms
89,300 KB
testcase_12 AC 76 ms
87,432 KB
testcase_13 AC 66 ms
80,760 KB
testcase_14 AC 85 ms
89,284 KB
testcase_15 AC 76 ms
86,264 KB
testcase_16 AC 117 ms
102,956 KB
testcase_17 AC 84 ms
91,256 KB
testcase_18 AC 74 ms
84,572 KB
testcase_19 AC 71 ms
82,516 KB
testcase_20 AC 117 ms
105,528 KB
testcase_21 AC 78 ms
87,416 KB
testcase_22 AC 98 ms
97,836 KB
testcase_23 AC 38 ms
52,524 KB
testcase_24 AC 38 ms
52,664 KB
testcase_25 AC 131 ms
110,884 KB
testcase_26 AC 160 ms
108,636 KB
testcase_27 AC 164 ms
108,432 KB
testcase_28 AC 160 ms
108,772 KB
testcase_29 AC 154 ms
108,736 KB
testcase_30 AC 165 ms
108,444 KB
testcase_31 AC 157 ms
108,424 KB
testcase_32 AC 157 ms
108,220 KB
testcase_33 AC 158 ms
108,128 KB
testcase_34 AC 160 ms
108,956 KB
testcase_35 AC 158 ms
108,708 KB
testcase_36 AC 39 ms
53,268 KB
testcase_37 AC 39 ms
53,452 KB
testcase_38 AC 39 ms
53,796 KB
testcase_39 AC 39 ms
54,108 KB
testcase_40 AC 38 ms
53,848 KB
testcase_41 AC 39 ms
53,612 KB
testcase_42 AC 38 ms
53,500 KB
testcase_43 AC 39 ms
53,996 KB
testcase_44 AC 38 ms
54,252 KB
testcase_45 AC 37 ms
52,404 KB
testcase_46 AC 96 ms
91,964 KB
testcase_47 AC 75 ms
80,128 KB
testcase_48 AC 76 ms
81,732 KB
testcase_49 AC 103 ms
94,028 KB
testcase_50 AC 99 ms
92,136 KB
testcase_51 AC 103 ms
94,100 KB
testcase_52 AC 91 ms
89,672 KB
testcase_53 AC 106 ms
97,028 KB
testcase_54 AC 78 ms
82,892 KB
testcase_55 AC 73 ms
80,204 KB
testcase_56 AC 74 ms
80,016 KB
testcase_57 AC 98 ms
92,192 KB
testcase_58 AC 72 ms
79,284 KB
testcase_59 AC 68 ms
77,488 KB
testcase_60 AC 80 ms
84,912 KB
testcase_61 AC 97 ms
91,648 KB
testcase_62 AC 90 ms
88,276 KB
testcase_63 AC 79 ms
83,904 KB
testcase_64 AC 98 ms
93,908 KB
testcase_65 AC 84 ms
85,448 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(lambda x: min(2,int(x)), input().split()))
dp = [[0]*3 for _ in range(N)]
def mex(lis):
  for i in range(4):
    if i not in lis:
      return i
for i in range(N):
  if i>0:
    dp[i][0] = dp[i-1][A[i-1]]
  for j in range(1,A[i]+1):
    dp[i][j] = mex(dp[i][:j])
print("Alice" if dp[-1][A[-1]]>0 else "Bob")
0