結果
| 問題 | No.406 鴨等間隔の法則 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-06-07 20:14:50 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 81 ms / 2,000 ms |
| + 832µs | |
| コード長 | 324 bytes |
| 記録 | |
| コンパイル時間 | 102 ms |
| コンパイル使用メモリ | 14,592 KB |
| 実行使用メモリ | 21,092 KB |
| 最終ジャッジ日時 | 2026-10-24 02:07:27 |
| 合計ジャッジ時間 | 4,221 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
n = int(input())
x = list(map(int,input().split()))
x_so = sorted(x)
che = []
che_er = False
for i in range(1, n):
che.append(x_so[i] - x_so[i - 1])
if x_so[i] - x_so[i - 1] == 0:
che_er = True
break
che_set = set(che)
if che_er:
print('NO')
elif (len(che_set) == 1):
print('YES')
else:
print('NO')