結果

問題 No.406 鴨等間隔の法則
ユーザー mmmpppmmmppp
提出日時 2017-02-16 02:36:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 173 ms / 2,000 ms
コード長 101 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 11,464 KB
実行使用メモリ 25,556 KB
最終ジャッジ日時 2023-09-21 18:22:49
合計ジャッジ時間 5,583 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
19,012 KB
testcase_01 AC 80 ms
15,292 KB
testcase_02 AC 81 ms
15,160 KB
testcase_03 AC 84 ms
15,316 KB
testcase_04 AC 158 ms
24,404 KB
testcase_05 AC 110 ms
18,724 KB
testcase_06 AC 110 ms
18,800 KB
testcase_07 AC 110 ms
18,892 KB
testcase_08 AC 152 ms
23,852 KB
testcase_09 AC 167 ms
25,176 KB
testcase_10 AC 114 ms
18,912 KB
testcase_11 AC 144 ms
22,268 KB
testcase_12 AC 122 ms
19,792 KB
testcase_13 AC 117 ms
19,660 KB
testcase_14 AC 144 ms
22,640 KB
testcase_15 AC 83 ms
15,572 KB
testcase_16 AC 84 ms
15,616 KB
testcase_17 AC 82 ms
15,392 KB
testcase_18 AC 85 ms
15,760 KB
testcase_19 AC 85 ms
15,900 KB
testcase_20 AC 88 ms
15,888 KB
testcase_21 AC 88 ms
16,264 KB
testcase_22 AC 95 ms
16,984 KB
testcase_23 AC 124 ms
20,144 KB
testcase_24 AC 140 ms
21,736 KB
testcase_25 AC 169 ms
25,556 KB
testcase_26 AC 169 ms
25,256 KB
testcase_27 AC 156 ms
25,220 KB
testcase_28 AC 160 ms
25,292 KB
testcase_29 AC 173 ms
25,272 KB
testcase_30 AC 166 ms
25,000 KB
testcase_31 AC 168 ms
24,956 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,*c=`dd`.split.map &:to_i;c.sort!
a=(n-1).times.map{|i|c[i+1]-c[i]}.uniq
puts a[1]||a==[0]?:NO: :YES
0