結果
| 問題 |
No.406 鴨等間隔の法則
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-29 01:14:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 127 ms / 2,000 ms |
| コード長 | 178 bytes |
| コンパイル時間 | 242 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,604 KB |
| 最終ジャッジ日時 | 2024-12-30 17:47:48 |
| 合計ジャッジ時間 | 4,702 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
N=int(input())
A=list(map(int,input().split()))
A.sort()
d=-1
for i in range(N-1):
if i:
if d!=A[i+1]-A[i] or d==0:
print('NO')
exit()
else:
d=A[1]-A[0]
print('YES')