結果

問題 No.406 鴨等間隔の法則
ユーザー mmmpppmmmppp
提出日時 2017-02-16 03:12:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 93 bytes
コンパイル時間 168 ms
コンパイル使用メモリ 11,428 KB
実行使用メモリ 26,312 KB
最終ジャッジ日時 2023-09-21 18:23:19
合計ジャッジ時間 5,969 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
19,500 KB
testcase_01 AC 85 ms
15,308 KB
testcase_02 AC 83 ms
15,272 KB
testcase_03 AC 83 ms
15,224 KB
testcase_04 AC 168 ms
24,924 KB
testcase_05 AC 117 ms
18,696 KB
testcase_06 AC 120 ms
19,056 KB
testcase_07 AC 119 ms
19,040 KB
testcase_08 AC 165 ms
24,444 KB
testcase_09 AC 180 ms
26,064 KB
testcase_10 AC 121 ms
19,452 KB
testcase_11 AC 154 ms
22,912 KB
testcase_12 AC 128 ms
20,132 KB
testcase_13 AC 125 ms
20,004 KB
testcase_14 AC 154 ms
23,348 KB
testcase_15 AC 88 ms
15,524 KB
testcase_16 AC 87 ms
15,660 KB
testcase_17 AC 85 ms
15,544 KB
testcase_18 AC 89 ms
15,692 KB
testcase_19 AC 91 ms
15,888 KB
testcase_20 AC 91 ms
16,032 KB
testcase_21 AC 93 ms
16,360 KB
testcase_22 AC 100 ms
16,948 KB
testcase_23 AC 135 ms
20,540 KB
testcase_24 AC 146 ms
22,080 KB
testcase_25 AC 181 ms
26,312 KB
testcase_26 AC 180 ms
25,996 KB
testcase_27 AC 168 ms
25,916 KB
testcase_28 AC 172 ms
26,060 KB
testcase_29 AC 178 ms
25,812 KB
testcase_30 AC 180 ms
25,772 KB
testcase_31 AC 179 ms
25,796 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

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