結果
| 問題 | No.1506 Unbalanced Pocky Game |
| コンテスト | |
| ユーザー |
gew1fw
|
| 提出日時 | 2025-06-12 20:47:58 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| + 304µs | |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 238 ms |
| コンパイル使用メモリ | 95,852 KB |
| 実行使用メモリ | 113,408 KB |
| 最終ジャッジ日時 | 2026-07-12 01:31:07 |
| 合計ジャッジ時間 | 7,887 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
found = False
p = 0
for i in range(n-1, -1, -1):
if a[i] > 1:
p = n - i
found = True
break
if found:
if p % 2 == 1:
print("Alice")
else:
print("Bob")
else:
if n % 2 == 1:
print("Alice")
else:
print("Bob")
gew1fw