結果

問題 No.647 明太子
ユーザー cympfhcympfh
提出日時 2018-03-02 18:43:05
言語 Ruby
(3.3.0)
結果
AC  
実行時間 4,330 ms / 4,500 ms
コード長 193 bytes
コンパイル時間 447 ms
コンパイル使用メモリ 11,424 KB
実行使用メモリ 16,780 KB
最終ジャッジ日時 2023-08-27 02:28:07
合計ジャッジ時間 15,546 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
15,292 KB
testcase_01 AC 70 ms
15,252 KB
testcase_02 AC 70 ms
15,264 KB
testcase_03 AC 71 ms
15,256 KB
testcase_04 AC 70 ms
15,128 KB
testcase_05 AC 70 ms
15,212 KB
testcase_06 AC 69 ms
15,216 KB
testcase_07 AC 71 ms
15,148 KB
testcase_08 AC 74 ms
15,264 KB
testcase_09 AC 104 ms
15,064 KB
testcase_10 AC 140 ms
15,360 KB
testcase_11 AC 87 ms
15,128 KB
testcase_12 AC 122 ms
15,100 KB
testcase_13 AC 185 ms
15,040 KB
testcase_14 AC 1,598 ms
16,140 KB
testcase_15 AC 281 ms
15,024 KB
testcase_16 AC 124 ms
15,072 KB
testcase_17 AC 1,990 ms
16,324 KB
testcase_18 AC 2,191 ms
16,468 KB
testcase_19 AC 630 ms
16,320 KB
testcase_20 AC 679 ms
16,032 KB
testcase_21 AC 282 ms
15,352 KB
testcase_22 AC 4,330 ms
16,780 KB
testcase_23 AC 77 ms
15,100 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

z=(1..gets.to_i).map{gets.split};r=(1..gets.to_i).map{|i|x,y=gets.split;[i,z.count{|a,b|x.to_i<=a.to_i&&y.to_i>=b.to_i}]}
m=r.map{|a|a[1]}.max
m<1&&p(0)||puts(r.select{|a|a[1]==m}.map{|a|a[0]})
0