結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
18,948 KB
testcase_01 AC 80 ms
15,236 KB
testcase_02 AC 79 ms
15,272 KB
testcase_03 AC 83 ms
15,084 KB
testcase_04 AC 153 ms
24,340 KB
testcase_05 AC 108 ms
18,476 KB
testcase_06 AC 109 ms
18,608 KB
testcase_07 AC 110 ms
18,880 KB
testcase_08 AC 151 ms
23,904 KB
testcase_09 AC 166 ms
25,292 KB
testcase_10 AC 115 ms
18,940 KB
testcase_11 AC 143 ms
22,228 KB
testcase_12 AC 122 ms
19,848 KB
testcase_13 AC 119 ms
19,624 KB
testcase_14 AC 144 ms
22,584 KB
testcase_15 AC 83 ms
15,496 KB
testcase_16 AC 84 ms
15,580 KB
testcase_17 AC 81 ms
15,440 KB
testcase_18 AC 85 ms
15,600 KB
testcase_19 AC 85 ms
15,628 KB
testcase_20 AC 88 ms
15,956 KB
testcase_21 AC 91 ms
16,080 KB
testcase_22 AC 98 ms
16,940 KB
testcase_23 AC 126 ms
19,924 KB
testcase_24 AC 139 ms
21,744 KB
testcase_25 AC 168 ms
25,340 KB
testcase_26 AC 168 ms
25,004 KB
testcase_27 AC 154 ms
25,184 KB
testcase_28 AC 156 ms
25,388 KB
testcase_29 AC 165 ms
25,240 KB
testcase_30 AC 166 ms
24,976 KB
testcase_31 AC 165 ms
25,104 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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