結果
問題 |
No.1053 ゲーミング棒
|
ユーザー |
👑 ![]() |
提出日時 | 2021-02-26 02:21:09 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 215 bytes |
コンパイル時間 | 414 ms |
コンパイル使用メモリ | 82,452 KB |
実行使用メモリ | 103,424 KB |
最終ジャッジ日時 | 2024-10-01 18:33:27 |
合計ジャッジ時間 | 3,198 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 32 WA * 2 |
ソースコード
N=int(input()) A=list(map(int,input().split())) B=[A[0]] a=A[0] for x in A[1:]: if a!=x: a=x B.append(a) if len(B)==len(set(B)): print(0) elif B[0]==B[-1]: print(1) else: print(-1)