結果
| 問題 |
No.1506 Unbalanced Pocky Game
|
| コンテスト | |
| ユーザー |
tamato
|
| 提出日時 | 2021-05-14 22:14:09 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 482 bytes |
| コンパイル時間 | 180 ms |
| コンパイル使用メモリ | 82,560 KB |
| 実行使用メモリ | 102,144 KB |
| 最終ジャッジ日時 | 2024-10-02 01:34:55 |
| 合計ジャッジ時間 | 6,131 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 63 |
ソースコード
mod = 1000000007
eps = 10**-9
def main():
import sys
input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
flg = 0
for a in A[::-1]:
if a != 1:
flg += 2
break
else:
flg ^= 1
if flg == 2:
print("Alice")
elif flg == 3:
print("Bob")
elif flg == 0:
print("Bob")
elif flg == 1:
print("Alice")
if __name__ == '__main__':
main()
tamato