結果
| 問題 | No.1053 ゲーミング棒 |
| コンテスト | |
| ユーザー |
👑 Kazun
|
| 提出日時 | 2021-02-26 02:22:37 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 69 ms / 2,000 ms |
| + 88µs | |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 518 ms |
| コンパイル使用メモリ | 81,024 KB |
| 実行使用メモリ | 121,600 KB |
| 最終ジャッジ日時 | 2026-09-08 00:15:14 |
| 合計ジャッジ時間 | 3,807 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
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 len(B)==len(set(B))+1 and B[0]==B[-1]:
print(1)
else:
print(-1)
Kazun