提出 #6427727


ソースコード 拡げる

N = gets.chomp.to_i
mat = []
N.times do |n|
    s,p = gets.chomp.split(" ")
    mat << [s,p.to_i, n+1]
end

mat.sort! do |a,b|
    (a[0] <=> b[0] ).nonzero? || (b[1] <=> a[1])
end
puts mat.map{|n| n[2]}

提出情報

提出日時
問題 B - Guidebook
ユーザ rk018
言語 Ruby (2.3.3)
得点 200
コード長 212 Byte
結果 AC
実行時間 8 ms
メモリ 1788 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 7
セット名 テストケース
Sample 01.txt, 02.txt
All 01.txt, 02.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt
ケース名 結果 実行時間 メモリ
01.txt AC 8 ms 1788 KiB
02.txt AC 8 ms 1788 KiB
11.txt AC 8 ms 1788 KiB
12.txt AC 8 ms 1788 KiB
13.txt AC 7 ms 1788 KiB
14.txt AC 8 ms 1788 KiB
15.txt AC 8 ms 1788 KiB