結果
| 問題 |
No.406 鴨等間隔の法則
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-10 20:45:33 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 114 ms / 2,000 ms |
| コード長 | 290 bytes |
| コンパイル時間 | 653 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 18,864 KB |
| 最終ジャッジ日時 | 2024-07-07 11:51:01 |
| 合計ジャッジ時間 | 4,015 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
ソースコード
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll
N = int(raw_input())
x = sorted(map(int, raw_input().split()))
if len(set(x)) == N and len(set((x[i + 1] - x[i] for i in xrange(N - 1)))) == 1:
print "YES"
else:
print "NO"