結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-05-14 23:05:12 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 91 ms / 2,000 ms |
| コード長 | 709 bytes |
| コンパイル時間 | 104 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 24,236 KB |
| 最終ジャッジ日時 | 2024-10-02 03:47:08 |
| 合計ジャッジ時間 | 5,127 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
import sys
sys.setrecursionlimit(10 ** 6)
def II(): return int(sys.stdin.readline())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LC(): return list(input())
def IC(): return [int(c) for c in input()]
def MI(): return map(int, sys.stdin.readline().split())
INF = float('inf')
MOD = 10**9 + 7
def solve():
N = II()
A = LI()
Alice = True
for last in range(N-1,-1,-1):
if(A[last] == 1):
Alice = not Alice
else:
break
#最後まで1だった場合、空列で先行になる人が負け
if(last == 0):
Alice = not Alice
if(Alice):
print("Alice")
else:
print("Bob")
return
solve()