結果

問題 No.647 明太子
ユーザー cympfhcympfh
提出日時 2018-03-02 18:43:56
言語 Ruby
(3.3.0)
結果
AC  
実行時間 2,836 ms / 4,500 ms
コード長 194 bytes
コンパイル時間 59 ms
コンパイル使用メモリ 11,228 KB
実行使用メモリ 15,796 KB
最終ジャッジ日時 2023-09-09 09:39:42
合計ジャッジ時間 10,871 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,180 KB
testcase_01 AC 76 ms
15,264 KB
testcase_02 AC 77 ms
15,232 KB
testcase_03 AC 77 ms
15,084 KB
testcase_04 AC 78 ms
15,020 KB
testcase_05 AC 79 ms
15,184 KB
testcase_06 AC 79 ms
15,188 KB
testcase_07 AC 78 ms
15,144 KB
testcase_08 AC 78 ms
15,024 KB
testcase_09 AC 99 ms
15,016 KB
testcase_10 AC 123 ms
15,264 KB
testcase_11 AC 87 ms
15,076 KB
testcase_12 AC 114 ms
15,040 KB
testcase_13 AC 161 ms
15,024 KB
testcase_14 AC 1,091 ms
15,452 KB
testcase_15 AC 216 ms
15,080 KB
testcase_16 AC 113 ms
15,224 KB
testcase_17 AC 1,347 ms
15,656 KB
testcase_18 AC 1,475 ms
15,404 KB
testcase_19 AC 507 ms
15,600 KB
testcase_20 AC 542 ms
15,596 KB
testcase_21 AC 242 ms
15,288 KB
testcase_22 AC 2,836 ms
15,796 KB
testcase_23 AC 80 ms
15,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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