結果

問題 No.647 明太子
ユーザー cympfhcympfh
提出日時 2018-03-02 18:29:31
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,131 ms / 4,500 ms
コード長 221 bytes
コンパイル時間 570 ms
コンパイル使用メモリ 11,180 KB
実行使用メモリ 71,928 KB
最終ジャッジ日時 2023-09-09 09:38:39
合計ジャッジ時間 6,271 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,096 KB
testcase_01 AC 80 ms
15,176 KB
testcase_02 AC 77 ms
15,104 KB
testcase_03 AC 77 ms
15,160 KB
testcase_04 AC 78 ms
15,204 KB
testcase_05 AC 77 ms
15,132 KB
testcase_06 AC 77 ms
15,148 KB
testcase_07 AC 76 ms
15,096 KB
testcase_08 AC 77 ms
15,176 KB
testcase_09 AC 88 ms
15,972 KB
testcase_10 AC 100 ms
17,068 KB
testcase_11 AC 83 ms
15,360 KB
testcase_12 AC 98 ms
16,432 KB
testcase_13 AC 118 ms
17,600 KB
testcase_14 AC 513 ms
24,248 KB
testcase_15 AC 144 ms
18,176 KB
testcase_16 AC 95 ms
16,464 KB
testcase_17 AC 629 ms
28,496 KB
testcase_18 AC 672 ms
28,740 KB
testcase_19 AC 282 ms
16,652 KB
testcase_20 AC 294 ms
16,828 KB
testcase_21 AC 156 ms
16,780 KB
testcase_22 AC 1,131 ms
71,928 KB
testcase_23 AC 78 ms
15,320 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

z=gets.to_i.times.map{gets.split.map &:to_i}
r=gets.to_i.times.map{|i|x,y=gets.split.map(&:to_i);[i,z.select{|a,b|x<=a&&y>=b}.size]}
mx=r.map{|a|a[1]}.max
if mx.zero?
p 0
else
puts r.select{|a|a[1]==mx}.map{|a|a[0]+1}
end
0