結果
| 問題 | No.1506 Unbalanced Pocky Game |
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 18:14:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| + 538µs | |
| コード長 | 296 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 95,472 KB |
| 実行使用メモリ | 114,688 KB |
| 最終ジャッジ日時 | 2026-07-11 19:03:38 |
| 合計ジャッジ時間 | 8,105 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
a = a[::-1] # Reverse the array
count = 0
for x in a:
if x == 1:
count += 1
else:
break
if all(x == 1 for x in a):
print("Alice" if count % 2 == 1 else "Bob")
else:
print("Alice" if count % 2 == 0 else "Bob")
gew1fw