結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー DrDrpilotDrDrpilot
提出日時 2022-02-05 16:33:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 698 ms / 2,000 ms
コード長 312 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 10,748 KB
実行使用メモリ 35,344 KB
最終ジャッジ日時 2023-09-02 06:45:59
合計ジャッジ時間 17,429 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,448 KB
testcase_01 AC 19 ms
8,604 KB
testcase_02 AC 19 ms
8,448 KB
testcase_03 AC 19 ms
8,448 KB
testcase_04 AC 29 ms
8,976 KB
testcase_05 AC 29 ms
9,016 KB
testcase_06 AC 30 ms
9,028 KB
testcase_07 AC 29 ms
9,116 KB
testcase_08 AC 30 ms
9,068 KB
testcase_09 AC 32 ms
9,228 KB
testcase_10 AC 32 ms
9,256 KB
testcase_11 AC 31 ms
9,116 KB
testcase_12 AC 18 ms
8,492 KB
testcase_13 AC 18 ms
8,572 KB
testcase_14 AC 19 ms
8,448 KB
testcase_15 AC 19 ms
8,456 KB
testcase_16 AC 19 ms
8,452 KB
testcase_17 AC 19 ms
8,496 KB
testcase_18 AC 18 ms
8,604 KB
testcase_19 AC 19 ms
8,492 KB
testcase_20 AC 19 ms
8,660 KB
testcase_21 AC 18 ms
8,656 KB
testcase_22 AC 18 ms
8,568 KB
testcase_23 AC 18 ms
8,452 KB
testcase_24 AC 19 ms
8,516 KB
testcase_25 AC 19 ms
8,656 KB
testcase_26 AC 19 ms
8,648 KB
testcase_27 AC 18 ms
8,628 KB
testcase_28 AC 18 ms
8,444 KB
testcase_29 AC 19 ms
8,504 KB
testcase_30 AC 18 ms
8,448 KB
testcase_31 AC 18 ms
8,576 KB
testcase_32 AC 285 ms
17,328 KB
testcase_33 AC 194 ms
15,736 KB
testcase_34 AC 425 ms
21,404 KB
testcase_35 AC 363 ms
19,792 KB
testcase_36 AC 423 ms
22,192 KB
testcase_37 AC 229 ms
16,352 KB
testcase_38 AC 215 ms
16,496 KB
testcase_39 AC 462 ms
22,116 KB
testcase_40 AC 297 ms
18,140 KB
testcase_41 AC 426 ms
21,252 KB
testcase_42 AC 265 ms
17,408 KB
testcase_43 AC 279 ms
18,400 KB
testcase_44 AC 366 ms
21,384 KB
testcase_45 AC 271 ms
17,408 KB
testcase_46 AC 467 ms
22,952 KB
testcase_47 AC 120 ms
12,540 KB
testcase_48 AC 262 ms
17,928 KB
testcase_49 AC 503 ms
23,208 KB
testcase_50 AC 253 ms
16,400 KB
testcase_51 AC 223 ms
16,088 KB
testcase_52 AC 541 ms
25,508 KB
testcase_53 AC 541 ms
25,492 KB
testcase_54 AC 693 ms
35,280 KB
testcase_55 AC 698 ms
35,344 KB
testcase_56 AC 694 ms
35,220 KB
testcase_57 AC 690 ms
35,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict


d=defaultdict(str)
n,m=map(int,input().split())
for _ in range(n):
    s,t=map(str,input().split())
    d[s]=t
for _ in range(m):
    s,t=map(str,input().split())
    d[s]=t
ans=[]
for key,val in d.items():
    ans.append([key,val])
ans.sort()
for a,b in ans:
    print(a,b)
0