結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー titan23titan23
提出日時 2022-06-28 23:29:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 568 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 103,368 KB
最終ジャッジ日時 2024-05-01 13:52:48
合計ジャッジ時間 13,888 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
53,632 KB
testcase_01 AC 46 ms
53,376 KB
testcase_02 AC 47 ms
53,248 KB
testcase_03 AC 47 ms
54,016 KB
testcase_04 AC 89 ms
74,496 KB
testcase_05 AC 89 ms
74,624 KB
testcase_06 AC 87 ms
73,856 KB
testcase_07 AC 85 ms
73,472 KB
testcase_08 AC 84 ms
73,216 KB
testcase_09 AC 85 ms
74,112 KB
testcase_10 AC 94 ms
77,056 KB
testcase_11 AC 85 ms
73,344 KB
testcase_12 AC 48 ms
53,760 KB
testcase_13 AC 48 ms
53,760 KB
testcase_14 AC 48 ms
53,632 KB
testcase_15 AC 47 ms
53,760 KB
testcase_16 AC 48 ms
53,888 KB
testcase_17 AC 48 ms
53,632 KB
testcase_18 AC 47 ms
53,504 KB
testcase_19 AC 48 ms
53,504 KB
testcase_20 AC 49 ms
54,016 KB
testcase_21 AC 47 ms
53,760 KB
testcase_22 AC 48 ms
53,760 KB
testcase_23 AC 47 ms
53,632 KB
testcase_24 AC 49 ms
54,016 KB
testcase_25 AC 48 ms
53,888 KB
testcase_26 AC 48 ms
53,888 KB
testcase_27 AC 48 ms
53,632 KB
testcase_28 AC 48 ms
53,760 KB
testcase_29 AC 48 ms
53,760 KB
testcase_30 AC 48 ms
53,888 KB
testcase_31 AC 48 ms
53,632 KB
testcase_32 AC 252 ms
88,320 KB
testcase_33 AC 204 ms
84,504 KB
testcase_34 AC 335 ms
90,988 KB
testcase_35 AC 295 ms
89,880 KB
testcase_36 AC 339 ms
92,068 KB
testcase_37 AC 227 ms
85,920 KB
testcase_38 AC 220 ms
86,272 KB
testcase_39 AC 374 ms
93,036 KB
testcase_40 AC 279 ms
89,028 KB
testcase_41 AC 350 ms
91,524 KB
testcase_42 AC 249 ms
87,720 KB
testcase_43 AC 270 ms
89,244 KB
testcase_44 AC 318 ms
91,036 KB
testcase_45 AC 254 ms
87,548 KB
testcase_46 AC 381 ms
94,244 KB
testcase_47 AC 160 ms
82,048 KB
testcase_48 AC 257 ms
88,832 KB
testcase_49 AC 398 ms
94,176 KB
testcase_50 AC 236 ms
86,536 KB
testcase_51 AC 220 ms
85,152 KB
testcase_52 AC 425 ms
96,992 KB
testcase_53 AC 429 ms
97,120 KB
testcase_54 AC 566 ms
103,360 KB
testcase_55 AC 562 ms
103,368 KB
testcase_56 AC 550 ms
103,108 KB
testcase_57 AC 568 ms
103,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import defaultdict
input = lambda: sys.stdin.readline().rstrip()

#  -----------------------  #

n, m = map(int, input().split())
sa = defaultdict(lambda: -1)
for _ in range(n):
  s, a = input().split()
  sa[s] = a

ans = []
for _ in range(m):
  t, b = input().split()
  sa[t] = b

for k,v in sorted(sa.items()):
  print(k, v)
0