結果
問題 | No.1506 Unbalanced Pocky Game |
ユーザー |
![]() |
提出日時 | 2021-05-14 23:10:35 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 427 bytes |
コンパイル時間 | 169 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 24,324 KB |
最終ジャッジ日時 | 2024-10-02 04:16:16 |
合計ジャッジ時間 | 5,352 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 33 WA * 30 |
ソースコード
#1506 Unbalanced Pocky Game n=int(input()) A=list(map(int,input().split())) cntCont=0 isReverse=False for el in A: if el==1: cntCont+=1 else: if cntCont>1 and cntCont%2==0: isReverse=not isReverse cntCont=0 if A[-1]!=1: if not isReverse: print('Alice') else: print('Bob') else: if not isReverse: print('Bob') else: print('Alice')