結果

問題 No.1506 Unbalanced Pocky Game
ユーザー 👑 H20H20
提出日時 2021-05-15 01:43:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 82,076 KB
実行使用メモリ 107,592 KB
最終ジャッジ日時 2024-04-10 06:42:41
合計ジャッジ時間 5,978 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,876 KB
testcase_01 AC 42 ms
53,668 KB
testcase_02 AC 42 ms
54,540 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 47 ms
66,696 KB
testcase_14 AC 57 ms
74,832 KB
testcase_15 AC 53 ms
70,780 KB
testcase_16 AC 68 ms
90,976 KB
testcase_17 AC 56 ms
75,448 KB
testcase_18 AC 52 ms
70,212 KB
testcase_19 AC 51 ms
68,348 KB
testcase_20 AC 71 ms
93,916 KB
testcase_21 AC 54 ms
72,520 KB
testcase_22 AC 64 ms
84,208 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 95 ms
107,592 KB
testcase_26 AC 91 ms
106,716 KB
testcase_27 AC 91 ms
106,752 KB
testcase_28 AC 91 ms
106,856 KB
testcase_29 AC 91 ms
106,948 KB
testcase_30 AC 90 ms
106,536 KB
testcase_31 AC 91 ms
106,708 KB
testcase_32 AC 91 ms
106,984 KB
testcase_33 AC 91 ms
106,640 KB
testcase_34 AC 91 ms
106,876 KB
testcase_35 AC 92 ms
107,120 KB
testcase_36 AC 41 ms
53,568 KB
testcase_37 AC 40 ms
55,116 KB
testcase_38 AC 41 ms
55,192 KB
testcase_39 AC 40 ms
53,544 KB
testcase_40 AC 41 ms
55,296 KB
testcase_41 AC 42 ms
53,868 KB
testcase_42 AC 41 ms
55,048 KB
testcase_43 AC 42 ms
54,056 KB
testcase_44 AC 40 ms
54,240 KB
testcase_45 AC 41 ms
54,440 KB
testcase_46 AC 58 ms
77,992 KB
testcase_47 AC 49 ms
66,432 KB
testcase_48 AC 49 ms
68,028 KB
testcase_49 AC 61 ms
80,616 KB
testcase_50 AC 60 ms
77,852 KB
testcase_51 AC 61 ms
79,640 KB
testcase_52 AC 56 ms
75,576 KB
testcase_53 AC 64 ms
85,284 KB
testcase_54 AC 51 ms
70,088 KB
testcase_55 AC 52 ms
66,504 KB
testcase_56 AC 49 ms
65,920 KB
testcase_57 AC 60 ms
77,572 KB
testcase_58 AC 48 ms
65,680 KB
testcase_59 AC 46 ms
63,044 KB
testcase_60 AC 53 ms
71,560 KB
testcase_61 AC 59 ms
77,416 KB
testcase_62 AC 55 ms
74,164 KB
testcase_63 AC 52 ms
70,156 KB
testcase_64 AC 65 ms
80,724 KB
testcase_65 AC 53 ms
72,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
N = int(input())
A = list(map(int, input().split()))
D = collections.deque(A)
aliceWin = True 
while len(D) and D[0]==1:
    D.popleft()
    aliceWin = not aliceWin
if len(D)==0:
    if aliceWin:
        print('Alice')
    else:
        print('Bob')
    exit()

aliceWin = True 
while len(D) and D[-1]==1:
    D.pop()
    aliceWin = not aliceWin
if aliceWin:
    print('Alice')
else:
    print('Bob')
0