結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-18 03:48:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| コード長 | 236 bytes |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 105,216 KB |
| 最終ジャッジ日時 | 2024-11-23 13:13:11 |
| 合計ジャッジ時間 | 7,186 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
n = int(input())
A = list(map(int, input().split()))
dp = [True] * n
for i in range(1, n):
if A[i] == 1:
dp[i] = dp[i - 1] ^ True
else:
dp[i] = True
if dp[-1]:
print("Alice")
else:
print("Bob")