結果

問題 No.406 鴨等間隔の法則
ユーザー roiti46roiti46
提出日時 2016-10-10 20:45:33
言語 Python2
(2.7.18)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 290 bytes
コンパイル時間 657 ms
コンパイル使用メモリ 6,520 KB
実行使用メモリ 18,432 KB
最終ジャッジ日時 2023-09-21 18:15:25
合計ジャッジ時間 4,846 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
12,080 KB
testcase_01 AC 24 ms
7,924 KB
testcase_02 AC 23 ms
7,760 KB
testcase_03 AC 23 ms
7,868 KB
testcase_04 AC 116 ms
17,764 KB
testcase_05 AC 56 ms
11,996 KB
testcase_06 AC 58 ms
11,856 KB
testcase_07 AC 58 ms
12,028 KB
testcase_08 AC 116 ms
17,888 KB
testcase_09 AC 124 ms
18,040 KB
testcase_10 AC 62 ms
11,984 KB
testcase_11 AC 98 ms
14,344 KB
testcase_12 AC 71 ms
12,512 KB
testcase_13 AC 68 ms
12,224 KB
testcase_14 AC 114 ms
14,668 KB
testcase_15 AC 26 ms
8,324 KB
testcase_16 AC 31 ms
9,068 KB
testcase_17 AC 27 ms
8,264 KB
testcase_18 AC 29 ms
8,936 KB
testcase_19 AC 33 ms
8,696 KB
testcase_20 AC 35 ms
8,928 KB
testcase_21 AC 36 ms
9,308 KB
testcase_22 AC 47 ms
11,412 KB
testcase_23 AC 74 ms
12,720 KB
testcase_24 AC 99 ms
13,784 KB
testcase_25 AC 125 ms
18,432 KB
testcase_26 AC 132 ms
18,356 KB
testcase_27 AC 77 ms
16,344 KB
testcase_28 AC 87 ms
18,076 KB
testcase_29 AC 133 ms
18,312 KB
testcase_30 AC 130 ms
18,176 KB
testcase_31 AC 120 ms
17,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# -*- 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"

0