結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー simansiman
提出日時 2021-12-24 16:32:06
言語 Ruby
(3.3.0)
結果
AC  
実行時間 627 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 11,880 KB
実行使用メモリ 40,784 KB
最終ジャッジ日時 2023-10-20 07:54:08
合計ジャッジ時間 16,631 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
16,100 KB
testcase_01 AC 84 ms
16,100 KB
testcase_02 AC 83 ms
16,100 KB
testcase_03 AC 85 ms
16,100 KB
testcase_04 AC 95 ms
16,464 KB
testcase_05 AC 93 ms
16,464 KB
testcase_06 AC 93 ms
16,488 KB
testcase_07 AC 93 ms
16,496 KB
testcase_08 AC 93 ms
16,504 KB
testcase_09 AC 94 ms
16,596 KB
testcase_10 AC 94 ms
16,588 KB
testcase_11 AC 93 ms
16,572 KB
testcase_12 AC 85 ms
16,100 KB
testcase_13 AC 86 ms
16,100 KB
testcase_14 AC 84 ms
16,100 KB
testcase_15 AC 85 ms
16,100 KB
testcase_16 AC 87 ms
16,100 KB
testcase_17 AC 85 ms
16,100 KB
testcase_18 AC 88 ms
16,100 KB
testcase_19 AC 85 ms
16,100 KB
testcase_20 AC 87 ms
16,100 KB
testcase_21 AC 87 ms
16,100 KB
testcase_22 AC 86 ms
16,100 KB
testcase_23 AC 87 ms
16,100 KB
testcase_24 AC 86 ms
16,096 KB
testcase_25 AC 85 ms
16,100 KB
testcase_26 AC 84 ms
16,100 KB
testcase_27 AC 85 ms
16,100 KB
testcase_28 AC 83 ms
16,100 KB
testcase_29 AC 88 ms
16,100 KB
testcase_30 AC 84 ms
16,100 KB
testcase_31 AC 84 ms
16,100 KB
testcase_32 AC 271 ms
24,948 KB
testcase_33 AC 216 ms
23,240 KB
testcase_34 AC 361 ms
26,652 KB
testcase_35 AC 341 ms
25,832 KB
testcase_36 AC 379 ms
27,140 KB
testcase_37 AC 243 ms
23,744 KB
testcase_38 AC 240 ms
23,888 KB
testcase_39 AC 401 ms
27,140 KB
testcase_40 AC 294 ms
24,868 KB
testcase_41 AC 382 ms
26,560 KB
testcase_42 AC 271 ms
24,980 KB
testcase_43 AC 290 ms
25,568 KB
testcase_44 AC 343 ms
26,580 KB
testcase_45 AC 274 ms
24,996 KB
testcase_46 AC 410 ms
29,360 KB
testcase_47 AC 169 ms
20,936 KB
testcase_48 AC 269 ms
24,812 KB
testcase_49 AC 431 ms
29,516 KB
testcase_50 AC 258 ms
23,800 KB
testcase_51 AC 236 ms
22,936 KB
testcase_52 AC 489 ms
35,616 KB
testcase_53 AC 486 ms
35,472 KB
testcase_54 AC 627 ms
40,784 KB
testcase_55 AC 624 ms
40,784 KB
testcase_56 AC 625 ms
40,784 KB
testcase_57 AC 625 ms
40,784 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, M = gets.split.map(&:to_i)

rating = Hash.new

N.times do
  s, a = gets.chomp.split
  rating[s] = a.to_i
end

M.times do
  t, b = gets.chomp.split
  rating[t] = b.to_i
end

rating.sort_by { |name, _| name }.each do |name, rate|
  puts [name, rate].join(' ')
end
0