結果

問題 No.1053 ゲーミング棒
ユーザー 👑 KazunKazun
提出日時 2021-02-26 02:21:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 215 bytes
コンパイル時間 387 ms
コンパイル使用メモリ 82,108 KB
実行使用メモリ 104,820 KB
最終ジャッジ日時 2024-04-09 18:29:49
合計ジャッジ時間 3,476 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,276 KB
testcase_01 AC 36 ms
52,372 KB
testcase_02 WA -
testcase_03 AC 35 ms
52,628 KB
testcase_04 AC 36 ms
52,200 KB
testcase_05 AC 36 ms
51,936 KB
testcase_06 AC 36 ms
52,016 KB
testcase_07 AC 36 ms
52,740 KB
testcase_08 AC 36 ms
52,636 KB
testcase_09 AC 36 ms
52,076 KB
testcase_10 AC 35 ms
52,896 KB
testcase_11 AC 36 ms
52,756 KB
testcase_12 AC 36 ms
52,208 KB
testcase_13 AC 36 ms
52,576 KB
testcase_14 AC 36 ms
52,152 KB
testcase_15 AC 36 ms
53,704 KB
testcase_16 AC 36 ms
53,496 KB
testcase_17 AC 36 ms
52,428 KB
testcase_18 AC 37 ms
52,096 KB
testcase_19 AC 36 ms
52,552 KB
testcase_20 AC 36 ms
52,768 KB
testcase_21 AC 36 ms
52,900 KB
testcase_22 AC 36 ms
52,828 KB
testcase_23 AC 77 ms
104,500 KB
testcase_24 AC 76 ms
104,808 KB
testcase_25 AC 79 ms
103,872 KB
testcase_26 AC 77 ms
104,820 KB
testcase_27 AC 36 ms
51,868 KB
testcase_28 AC 36 ms
52,340 KB
testcase_29 AC 36 ms
52,752 KB
testcase_30 AC 55 ms
78,236 KB
testcase_31 AC 56 ms
78,924 KB
testcase_32 AC 55 ms
79,320 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 58 ms
81,084 KB
testcase_36 AC 57 ms
80,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0