結果

問題 No.406 鴨等間隔の法則
ユーザー Takayuki HirotaTakayuki Hirota
提出日時 2021-02-04 10:11:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 108,600 KB
最終ジャッジ日時 2023-09-13 05:08:55
合計ジャッジ時間 5,945 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
86,820 KB
testcase_01 AC 70 ms
71,456 KB
testcase_02 AC 70 ms
71,356 KB
testcase_03 AC 69 ms
71,280 KB
testcase_04 AC 106 ms
103,364 KB
testcase_05 AC 82 ms
83,836 KB
testcase_06 AC 83 ms
83,972 KB
testcase_07 AC 84 ms
84,940 KB
testcase_08 AC 104 ms
103,272 KB
testcase_09 AC 108 ms
107,080 KB
testcase_10 AC 84 ms
86,592 KB
testcase_11 AC 103 ms
99,856 KB
testcase_12 AC 88 ms
89,976 KB
testcase_13 AC 88 ms
89,648 KB
testcase_14 AC 119 ms
104,372 KB
testcase_15 AC 73 ms
75,740 KB
testcase_16 AC 75 ms
75,728 KB
testcase_17 AC 74 ms
75,896 KB
testcase_18 AC 74 ms
75,936 KB
testcase_19 AC 75 ms
75,984 KB
testcase_20 AC 77 ms
76,608 KB
testcase_21 AC 80 ms
76,800 KB
testcase_22 AC 85 ms
80,144 KB
testcase_23 AC 89 ms
91,852 KB
testcase_24 AC 113 ms
100,912 KB
testcase_25 AC 108 ms
107,224 KB
testcase_26 AC 126 ms
108,528 KB
testcase_27 AC 92 ms
92,808 KB
testcase_28 AC 109 ms
107,064 KB
testcase_29 AC 125 ms
108,600 KB
testcase_30 AC 125 ms
108,452 KB
testcase_31 AC 108 ms
106,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
*x,=map(int,input().split())

lx=set(x)
if len(lx)<len(x):
	print('NO')
else:
	x.sort()
	d=[x[i+1]-x[i] for i in range(len(x)-1)]
	print('YNEOS'[len(set(d))>1::2])
0