結果

問題 No.406 鴨等間隔の法則
ユーザー first_vilfirst_vil
提出日時 2020-07-31 11:16:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 94 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 732 ms
コンパイル使用メモリ 10,640 KB
実行使用メモリ 18,792 KB
最終ジャッジ日時 2023-09-20 04:14:03
合計ジャッジ時間 3,954 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
13,264 KB
testcase_01 AC 16 ms
7,772 KB
testcase_02 AC 16 ms
7,744 KB
testcase_03 AC 17 ms
7,732 KB
testcase_04 AC 87 ms
17,788 KB
testcase_05 AC 40 ms
12,992 KB
testcase_06 AC 42 ms
13,004 KB
testcase_07 AC 42 ms
13,168 KB
testcase_08 AC 87 ms
18,316 KB
testcase_09 AC 94 ms
18,672 KB
testcase_10 AC 45 ms
13,248 KB
testcase_11 AC 73 ms
16,476 KB
testcase_12 AC 51 ms
13,312 KB
testcase_13 AC 49 ms
13,172 KB
testcase_14 AC 76 ms
16,976 KB
testcase_15 AC 18 ms
8,620 KB
testcase_16 AC 21 ms
9,340 KB
testcase_17 AC 18 ms
8,424 KB
testcase_18 AC 20 ms
9,424 KB
testcase_19 AC 21 ms
8,948 KB
testcase_20 AC 23 ms
9,452 KB
testcase_21 AC 25 ms
10,264 KB
testcase_22 AC 30 ms
10,600 KB
testcase_23 AC 54 ms
13,592 KB
testcase_24 AC 66 ms
15,800 KB
testcase_25 AC 94 ms
18,756 KB
testcase_26 AC 88 ms
18,724 KB
testcase_27 AC 59 ms
18,760 KB
testcase_28 AC 64 ms
18,792 KB
testcase_29 AC 88 ms
18,728 KB
testcase_30 AC 86 ms
18,572 KB
testcase_31 AC 91 ms
18,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=sorted(list(map(int,input().split())))
b=set([a[i+1]-a[i] for i in range(n-1)])
if len(b)!=1 or b.pop()==0:
    print('NO')
else:
    print('YES')
0