結果

問題 No.406 鴨等間隔の法則
ユーザー mmmpppmmmppp
提出日時 2017-02-24 08:54:34
言語 Ruby
(3.3.0)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 96 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 11,428 KB
実行使用メモリ 26,120 KB
最終ジャッジ日時 2023-09-21 18:24:12
合計ジャッジ時間 5,990 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
19,452 KB
testcase_01 AC 79 ms
15,208 KB
testcase_02 AC 81 ms
15,252 KB
testcase_03 AC 78 ms
15,100 KB
testcase_04 AC 148 ms
25,060 KB
testcase_05 AC 108 ms
18,700 KB
testcase_06 AC 109 ms
18,940 KB
testcase_07 AC 108 ms
19,160 KB
testcase_08 AC 146 ms
24,512 KB
testcase_09 AC 162 ms
26,024 KB
testcase_10 AC 113 ms
19,300 KB
testcase_11 AC 137 ms
22,816 KB
testcase_12 AC 120 ms
20,088 KB
testcase_13 AC 116 ms
19,800 KB
testcase_14 AC 140 ms
23,344 KB
testcase_15 AC 83 ms
15,284 KB
testcase_16 AC 84 ms
15,632 KB
testcase_17 AC 83 ms
15,272 KB
testcase_18 AC 85 ms
15,744 KB
testcase_19 AC 85 ms
15,852 KB
testcase_20 AC 88 ms
16,240 KB
testcase_21 AC 88 ms
16,248 KB
testcase_22 AC 95 ms
16,960 KB
testcase_23 AC 121 ms
20,308 KB
testcase_24 AC 135 ms
22,244 KB
testcase_25 AC 163 ms
26,120 KB
testcase_26 AC 161 ms
25,812 KB
testcase_27 AC 148 ms
25,824 KB
testcase_28 AC 152 ms
26,080 KB
testcase_29 AC 160 ms
25,912 KB
testcase_30 AC 160 ms
25,728 KB
testcase_31 AC 159 ms
25,728 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n,*c=$<.read.split.map &:to_i;a=c.sort.each_cons(2).map{|i,j|j-i}|[];puts a[1]||a==[0]?:NO: :YES
0