結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー lloyzlloyz
提出日時 2021-12-24 23:40:49
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 438 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 584 ms
コンパイル使用メモリ 81,704 KB
実行使用メモリ 98,912 KB
最終ジャッジ日時 2023-10-20 07:57:57
合計ジャッジ時間 12,098 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,400 KB
testcase_01 AC 38 ms
53,400 KB
testcase_02 AC 38 ms
53,400 KB
testcase_03 AC 41 ms
55,448 KB
testcase_04 AC 102 ms
77,504 KB
testcase_05 AC 106 ms
77,536 KB
testcase_06 AC 94 ms
76,868 KB
testcase_07 AC 94 ms
76,932 KB
testcase_08 AC 93 ms
77,008 KB
testcase_09 AC 92 ms
77,044 KB
testcase_10 AC 101 ms
76,832 KB
testcase_11 AC 94 ms
76,992 KB
testcase_12 AC 43 ms
55,448 KB
testcase_13 AC 41 ms
55,448 KB
testcase_14 AC 40 ms
55,448 KB
testcase_15 AC 40 ms
55,448 KB
testcase_16 AC 41 ms
55,448 KB
testcase_17 AC 40 ms
55,448 KB
testcase_18 AC 41 ms
55,448 KB
testcase_19 AC 40 ms
55,448 KB
testcase_20 AC 42 ms
55,448 KB
testcase_21 AC 41 ms
55,448 KB
testcase_22 AC 41 ms
55,448 KB
testcase_23 AC 41 ms
55,448 KB
testcase_24 AC 42 ms
55,448 KB
testcase_25 AC 42 ms
55,448 KB
testcase_26 AC 42 ms
55,448 KB
testcase_27 AC 42 ms
55,448 KB
testcase_28 AC 43 ms
55,448 KB
testcase_29 AC 41 ms
55,448 KB
testcase_30 AC 41 ms
55,448 KB
testcase_31 AC 41 ms
55,448 KB
testcase_32 AC 215 ms
86,164 KB
testcase_33 AC 197 ms
84,072 KB
testcase_34 AC 276 ms
88,136 KB
testcase_35 AC 243 ms
86,288 KB
testcase_36 AC 276 ms
87,548 KB
testcase_37 AC 194 ms
84,072 KB
testcase_38 AC 196 ms
83,788 KB
testcase_39 AC 304 ms
89,952 KB
testcase_40 AC 234 ms
85,928 KB
testcase_41 AC 287 ms
89,276 KB
testcase_42 AC 223 ms
85,132 KB
testcase_43 AC 220 ms
86,192 KB
testcase_44 AC 259 ms
87,380 KB
testcase_45 AC 216 ms
85,132 KB
testcase_46 AC 309 ms
90,064 KB
testcase_47 AC 148 ms
81,224 KB
testcase_48 AC 216 ms
85,972 KB
testcase_49 AC 315 ms
89,700 KB
testcase_50 AC 204 ms
83,856 KB
testcase_51 AC 191 ms
83,544 KB
testcase_52 AC 341 ms
93,464 KB
testcase_53 AC 344 ms
93,436 KB
testcase_54 AC 413 ms
98,868 KB
testcase_55 AC 438 ms
98,884 KB
testcase_56 AC 418 ms
98,876 KB
testcase_57 AC 426 ms
98,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

n, m = map(int, input().split())
Rate = defaultdict(int)
for _ in range(n):
    s, a = input().split()
    Rate[s] = int(a)
for _ in range(m):
    t, b = input().split()
    Rate[t] = int(b)

ANS = [(name, score) for name, score in Rate.items()]
ANS.sort(key=lambda x: x[0])
for name, score in ANS:
    print(name, score)
0