結果
| 問題 | No.1506 Unbalanced Pocky Game |
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-05-14 22:16:25 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 57 ms / 2,000 ms |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 157 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 104,192 KB |
| 最終ジャッジ日時 | 2026-04-18 10:51:28 |
| 合計ジャッジ時間 | 4,296 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
import sys
input = sys.stdin.readline
N = int(input())
a = list(map(int, input().split()))
dp = [0] * (N + 1)
for i in range(N):
if dp[i] == 0: dp[i + 1] = 1
else:
if a[i] == 1: dp[i + 1] = 0
else: dp[i + 1] = 1
#print(dp)
if dp[-1]: print("Alice")
else: print("Bob")
wolgnik