結果
| 問題 | No.1506 Unbalanced Pocky Game |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-05-15 01:33:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 435 bytes |
| 記録 | |
| コンパイル時間 | 756 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 117,632 KB |
| 最終ジャッジ日時 | 2026-04-18 18:07:46 |
| 合計ジャッジ時間 | 7,244 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 27 WA * 36 |
ソースコード
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')
aliceWin = True
A = list(D)
for i in reversed(range(len(A))):
if A[i]==1:
aliceWin = not aliceWin
if aliceWin:
print('Alice')
else:
print('Bob')
H20