結果

問題 No.406 鴨等間隔の法則
ユーザー Takayuki Hirota
提出日時 2021-02-04 10:11:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 218 ms
コンパイル使用メモリ 82,596 KB
実行使用メモリ 104,424 KB
最終ジャッジ日時 2024-06-30 15:19:43
合計ジャッジ時間 4,414 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 29
権限があれば一括ダウンロードができます

ソースコード

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