結果
問題 |
No.1053 ゲーミング棒
|
ユーザー |
![]() |
提出日時 | 2020-10-08 11:27:07 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 305 bytes |
コンパイル時間 | 75 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 23,784 KB |
最終ジャッジ日時 | 2024-07-20 05:52:54 |
合計ジャッジ時間 | 2,963 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 WA * 3 |
ソースコード
N=int(input()) A=list(map(int, input().split())) D=[A[0]] for i in range(N-1): if A[i]!=A[i+1]: D.append(A[i+1]) if D[0]==D[-1]: D=D[1:] if len(D)==len(set(D)): print(1) else: print(-1) else: if len(D)==len(set(D)): print(0) else: print(-1)