結果

問題 No.406 鴨等間隔の法則
ユーザー WatsonWatson
提出日時 2017-07-26 15:42:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 115 ms / 2,000 ms
コード長 244 bytes
コンパイル時間 85 ms
コンパイル使用メモリ 10,632 KB
実行使用メモリ 19,140 KB
最終ジャッジ日時 2023-09-21 18:33:10
合計ジャッジ時間 3,782 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
12,624 KB
testcase_01 AC 16 ms
7,848 KB
testcase_02 AC 17 ms
7,840 KB
testcase_03 AC 16 ms
7,864 KB
testcase_04 AC 105 ms
17,888 KB
testcase_05 AC 47 ms
11,836 KB
testcase_06 AC 48 ms
12,160 KB
testcase_07 AC 50 ms
12,216 KB
testcase_08 AC 104 ms
18,428 KB
testcase_09 AC 115 ms
18,796 KB
testcase_10 AC 53 ms
12,784 KB
testcase_11 AC 91 ms
16,560 KB
testcase_12 AC 64 ms
13,488 KB
testcase_13 AC 60 ms
13,072 KB
testcase_14 AC 95 ms
17,284 KB
testcase_15 AC 19 ms
8,808 KB
testcase_16 AC 21 ms
8,888 KB
testcase_17 AC 18 ms
8,632 KB
testcase_18 AC 22 ms
8,812 KB
testcase_19 AC 23 ms
9,080 KB
testcase_20 AC 25 ms
9,576 KB
testcase_21 AC 27 ms
9,484 KB
testcase_22 AC 36 ms
10,548 KB
testcase_23 AC 68 ms
13,744 KB
testcase_24 AC 83 ms
16,156 KB
testcase_25 AC 115 ms
18,912 KB
testcase_26 AC 106 ms
19,080 KB
testcase_27 AC 87 ms
19,140 KB
testcase_28 AC 92 ms
18,912 KB
testcase_29 AC 104 ms
19,004 KB
testcase_30 AC 104 ms
18,892 KB
testcase_31 AC 108 ms
18,576 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
X = [int(i) for i in input().split()]
X = list(X)
X = sorted(X)
B = 0
for i in range(N-2):
    if X[1+i]-X[i] != X[1]-X[0]:
        B = 1
    if X[1+i]-X[i] == 0:
        B = 1
if B == 1:
    print("NO")
else:
    print("YES")
0