結果

問題 No.1506 Unbalanced Pocky Game
ユーザー marroncastlemarroncastle
提出日時 2021-05-14 22:29:32
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 338 bytes
コンパイル時間 267 ms
コンパイル使用メモリ 81,968 KB
実行使用メモリ 110,804 KB
最終ジャッジ日時 2024-04-10 01:00:50
合計ジャッジ時間 7,960 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,472 KB
testcase_01 AC 36 ms
53,352 KB
testcase_02 AC 35 ms
52,816 KB
testcase_03 AC 52 ms
69,260 KB
testcase_04 AC 98 ms
101,812 KB
testcase_05 AC 105 ms
103,860 KB
testcase_06 AC 87 ms
95,536 KB
testcase_07 AC 78 ms
88,728 KB
testcase_08 AC 89 ms
95,696 KB
testcase_09 AC 108 ms
103,552 KB
testcase_10 AC 106 ms
105,956 KB
testcase_11 AC 75 ms
89,024 KB
testcase_12 AC 73 ms
87,296 KB
testcase_13 AC 64 ms
80,572 KB
testcase_14 AC 83 ms
89,164 KB
testcase_15 AC 72 ms
86,408 KB
testcase_16 AC 112 ms
103,012 KB
testcase_17 AC 81 ms
91,120 KB
testcase_18 AC 69 ms
84,672 KB
testcase_19 AC 70 ms
82,336 KB
testcase_20 AC 112 ms
105,844 KB
testcase_21 AC 75 ms
87,324 KB
testcase_22 AC 97 ms
97,872 KB
testcase_23 RE -
testcase_24 AC 36 ms
52,688 KB
testcase_25 AC 126 ms
110,804 KB
testcase_26 AC 152 ms
108,584 KB
testcase_27 AC 156 ms
108,148 KB
testcase_28 AC 148 ms
108,768 KB
testcase_29 AC 147 ms
108,680 KB
testcase_30 AC 161 ms
108,380 KB
testcase_31 AC 151 ms
108,520 KB
testcase_32 AC 151 ms
108,040 KB
testcase_33 AC 150 ms
108,376 KB
testcase_34 AC 153 ms
108,448 KB
testcase_35 AC 152 ms
108,960 KB
testcase_36 AC 36 ms
52,752 KB
testcase_37 AC 39 ms
53,564 KB
testcase_38 AC 36 ms
53,012 KB
testcase_39 AC 36 ms
52,988 KB
testcase_40 AC 38 ms
52,340 KB
testcase_41 AC 37 ms
53,356 KB
testcase_42 AC 36 ms
54,356 KB
testcase_43 AC 37 ms
52,944 KB
testcase_44 AC 38 ms
53,880 KB
testcase_45 AC 37 ms
53,100 KB
testcase_46 AC 97 ms
91,768 KB
testcase_47 AC 71 ms
80,156 KB
testcase_48 AC 73 ms
81,800 KB
testcase_49 AC 100 ms
93,968 KB
testcase_50 AC 97 ms
92,064 KB
testcase_51 AC 104 ms
93,624 KB
testcase_52 AC 90 ms
89,856 KB
testcase_53 AC 103 ms
96,672 KB
testcase_54 AC 76 ms
83,008 KB
testcase_55 AC 71 ms
80,192 KB
testcase_56 AC 72 ms
80,344 KB
testcase_57 AC 95 ms
91,868 KB
testcase_58 AC 69 ms
79,552 KB
testcase_59 AC 66 ms
77,472 KB
testcase_60 AC 76 ms
84,672 KB
testcase_61 AC 96 ms
91,436 KB
testcase_62 AC 89 ms
88,008 KB
testcase_63 AC 76 ms
83,776 KB
testcase_64 AC 96 ms
93,752 KB
testcase_65 AC 82 ms
85,260 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(N):
    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