結果

問題 No.1506 Unbalanced Pocky Game
ユーザー AAAR SalmonAAAR Salmon
提出日時 2021-05-14 22:54:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 488 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 34,044 KB
最終ジャッジ日時 2024-04-10 02:04:19
合計ジャッジ時間 9,028 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,880 KB
testcase_01 AC 27 ms
10,880 KB
testcase_02 AC 28 ms
10,880 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 57 ms
13,544 KB
testcase_14 AC 88 ms
16,680 KB
testcase_15 AC 78 ms
15,576 KB
testcase_16 AC 170 ms
24,208 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 81 ms
16,120 KB
testcase_22 AC 138 ms
19,900 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 AC 253 ms
32,276 KB
testcase_27 AC 248 ms
33,772 KB
testcase_28 AC 246 ms
32,956 KB
testcase_29 WA -
testcase_30 AC 238 ms
33,844 KB
testcase_31 WA -
testcase_32 AC 248 ms
32,368 KB
testcase_33 AC 250 ms
32,352 KB
testcase_34 AC 233 ms
31,816 KB
testcase_35 WA -
testcase_36 WA -
testcase_37 AC 27 ms
10,752 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 AC 30 ms
10,880 KB
testcase_42 AC 28 ms
10,880 KB
testcase_43 WA -
testcase_44 AC 29 ms
10,880 KB
testcase_45 AC 29 ms
11,008 KB
testcase_46 AC 95 ms
18,348 KB
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 AC 108 ms
19,288 KB
testcase_52 AC 90 ms
17,660 KB
testcase_53 WA -
testcase_54 AC 61 ms
14,648 KB
testcase_55 AC 51 ms
13,440 KB
testcase_56 AC 49 ms
13,412 KB
testcase_57 AC 96 ms
18,828 KB
testcase_58 WA -
testcase_59 AC 39 ms
12,288 KB
testcase_60 WA -
testcase_61 AC 93 ms
18,524 KB
testcase_62 WA -
testcase_63 AC 66 ms
15,088 KB
testcase_64 AC 102 ms
19,324 KB
testcase_65 AC 69 ms
15,948 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
import math
from math import sin, cos, tan
from functools import reduce
from collections import deque
import heapq
sys.setrecursionlimit(1000000)
intm1 = lambda x:int(x)-1

N = int(input())
A = list(map(int,input().split()))

dp = [[True, False] for _ in range(N + 1)] # True if Alice win
for i in range(N - 1, -1, -1):
	if A[i] == 1:
		dp[i][0] = not dp[i + 1][0]
		dp[i][1] = not dp[i + 1][1]
	else:
		dp[i][0] = True
		dp[i][1] = False
print('Alice' if dp[0][0] else 'Bob')
0