結果
| 問題 | No.1506 Unbalanced Pocky Game |
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-05-14 22:16:25 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 56 ms / 2,000 ms |
| + 858µs | |
| コード長 | 281 bytes |
| 記録 | |
| コンパイル時間 | 64 ms |
| コンパイル使用メモリ | 81,636 KB |
| 実行使用メモリ | 106,268 KB |
| 最終ジャッジ日時 | 2026-09-08 11:30:40 |
| 合計ジャッジ時間 | 5,294 ms |
|
ジャッジサーバーID (参考情報) |
judge3_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