結果

問題 No.647 明太子
ユーザー maimai
提出日時 2018-02-09 22:31:41
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 11,524 KB
実行使用メモリ 15,868 KB
最終ジャッジ日時 2023-08-27 02:13:51
合計ジャッジ時間 5,819 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
15,108 KB
testcase_01 AC 76 ms
15,256 KB
testcase_02 WA -
testcase_03 AC 75 ms
15,144 KB
testcase_04 AC 78 ms
15,208 KB
testcase_05 AC 76 ms
15,100 KB
testcase_06 AC 76 ms
15,328 KB
testcase_07 AC 78 ms
15,220 KB
testcase_08 AC 74 ms
15,124 KB
testcase_09 AC 85 ms
15,036 KB
testcase_10 AC 96 ms
15,104 KB
testcase_11 AC 81 ms
15,256 KB
testcase_12 AC 94 ms
15,088 KB
testcase_13 AC 114 ms
15,064 KB
testcase_14 AC 455 ms
15,628 KB
testcase_15 AC 130 ms
15,444 KB
testcase_16 AC 94 ms
15,092 KB
testcase_17 AC 547 ms
15,516 KB
testcase_18 AC 616 ms
15,632 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 836 ms
15,868 KB
testcase_23 AC 84 ms
15,268 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

def ascan;gets.split.map(&:to_i);end

n=gets.to_i
users = (0...n).map{ascan}
m=gets.to_i
mentai = (0...m).map{ascan}

cnts = []
mentai.map! do |me|
    x,y = me
    cnts << users.count{|a,b| x<=a && b<=y}
end

max_cnts = cnts.max

m.times do |i|
    p i+1 if cnts[i] == max_cnts
end
0