結果

問題 No.647 明太子
ユーザー mai
提出日時 2018-02-09 22:31:41
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 282 bytes
コンパイル時間 38 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,928 KB
最終ジャッジ日時 2024-12-26 07:38:34
合計ジャッジ時間 5,959 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3 WA * 1
other AC * 17 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
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