結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー 👑 obakyanobakyan
提出日時 2021-12-31 19:21:07
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 417 ms / 2,000 ms
コード長 309 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 29,476 KB
最終ジャッジ日時 2024-04-17 07:20:52
合計ジャッジ時間 8,900 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 5 ms
5,376 KB
testcase_05 AC 5 ms
5,376 KB
testcase_06 AC 6 ms
5,376 KB
testcase_07 AC 6 ms
5,376 KB
testcase_08 AC 7 ms
5,376 KB
testcase_09 AC 7 ms
5,376 KB
testcase_10 AC 7 ms
5,376 KB
testcase_11 AC 7 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 1 ms
5,376 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 AC 2 ms
5,376 KB
testcase_21 AC 2 ms
5,376 KB
testcase_22 AC 2 ms
5,376 KB
testcase_23 AC 2 ms
5,376 KB
testcase_24 AC 2 ms
5,376 KB
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
testcase_27 AC 2 ms
5,376 KB
testcase_28 AC 1 ms
5,376 KB
testcase_29 AC 2 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
testcase_32 AC 118 ms
12,996 KB
testcase_33 AC 85 ms
11,028 KB
testcase_34 AC 175 ms
15,628 KB
testcase_35 AC 150 ms
14,352 KB
testcase_36 AC 185 ms
16,440 KB
testcase_37 AC 91 ms
10,004 KB
testcase_38 AC 97 ms
12,360 KB
testcase_39 AC 190 ms
16,520 KB
testcase_40 AC 128 ms
13,712 KB
testcase_41 AC 181 ms
15,756 KB
testcase_42 AC 109 ms
12,700 KB
testcase_43 AC 131 ms
13,980 KB
testcase_44 AC 165 ms
15,768 KB
testcase_45 AC 117 ms
12,696 KB
testcase_46 AC 224 ms
15,900 KB
testcase_47 AC 45 ms
7,696 KB
testcase_48 AC 113 ms
12,972 KB
testcase_49 AC 218 ms
16,260 KB
testcase_50 AC 101 ms
11,160 KB
testcase_51 AC 95 ms
9,724 KB
testcase_52 AC 248 ms
20,720 KB
testcase_53 AC 289 ms
20,716 KB
testcase_54 AC 409 ms
29,476 KB
testcase_55 AC 417 ms
29,476 KB
testcase_56 AC 407 ms
29,372 KB
testcase_57 AC 405 ms
29,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

local n, m = io.read("*n", "*n", "*l")
local t = {}
for i = 1, n + m do
  local s, a = io.read():match("(%g+) (%d+)")
  t[s] = a
end
local z = {}
for k, v in pairs(t) do
  table.insert(z, {k, v})
end
table.sort(z, function(a, b) return a[1] < b[1] end)
for i = 1, #z do
  print(z[i][1] .. " " .. z[i][2])
end
0