結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
wolgnik
|
| 提出日時 | 2021-05-14 22:16:25 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 89 ms / 2,000 ms |
| コード長 | 281 bytes |
| コンパイル時間 | 168 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 104,448 KB |
| 最終ジャッジ日時 | 2024-10-02 01:40:51 |
| 合計ジャッジ時間 | 6,249 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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