結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー kept1994kept1994
提出日時 2022-04-28 13:20:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 520 ms / 2,000 ms
コード長 492 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 99,488 KB
最終ジャッジ日時 2023-09-10 16:49:26
合計ジャッジ時間 19,465 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
71,896 KB
testcase_01 AC 97 ms
71,312 KB
testcase_02 AC 100 ms
71,592 KB
testcase_03 AC 97 ms
71,508 KB
testcase_04 AC 162 ms
78,640 KB
testcase_05 AC 158 ms
78,700 KB
testcase_06 AC 152 ms
79,004 KB
testcase_07 AC 154 ms
79,168 KB
testcase_08 AC 143 ms
78,480 KB
testcase_09 AC 145 ms
78,440 KB
testcase_10 AC 154 ms
79,124 KB
testcase_11 AC 144 ms
78,584 KB
testcase_12 AC 98 ms
71,800 KB
testcase_13 AC 100 ms
71,648 KB
testcase_14 AC 95 ms
71,720 KB
testcase_15 AC 97 ms
71,352 KB
testcase_16 AC 97 ms
71,556 KB
testcase_17 AC 96 ms
71,724 KB
testcase_18 AC 97 ms
71,484 KB
testcase_19 AC 95 ms
71,348 KB
testcase_20 AC 99 ms
71,644 KB
testcase_21 AC 99 ms
71,804 KB
testcase_22 AC 99 ms
71,604 KB
testcase_23 AC 100 ms
71,580 KB
testcase_24 AC 98 ms
71,648 KB
testcase_25 AC 108 ms
71,420 KB
testcase_26 AC 99 ms
71,700 KB
testcase_27 AC 102 ms
71,600 KB
testcase_28 AC 99 ms
71,556 KB
testcase_29 AC 101 ms
71,824 KB
testcase_30 AC 103 ms
71,852 KB
testcase_31 AC 104 ms
71,756 KB
testcase_32 AC 282 ms
87,528 KB
testcase_33 AC 245 ms
85,488 KB
testcase_34 AC 342 ms
90,188 KB
testcase_35 AC 319 ms
89,552 KB
testcase_36 AC 333 ms
90,488 KB
testcase_37 AC 252 ms
85,224 KB
testcase_38 AC 253 ms
88,608 KB
testcase_39 AC 349 ms
91,840 KB
testcase_40 AC 281 ms
86,716 KB
testcase_41 AC 338 ms
91,880 KB
testcase_42 AC 268 ms
85,736 KB
testcase_43 AC 277 ms
87,928 KB
testcase_44 AC 319 ms
90,260 KB
testcase_45 AC 270 ms
85,768 KB
testcase_46 AC 362 ms
92,536 KB
testcase_47 AC 205 ms
82,764 KB
testcase_48 AC 272 ms
87,616 KB
testcase_49 AC 376 ms
92,664 KB
testcase_50 AC 262 ms
85,112 KB
testcase_51 AC 249 ms
84,524 KB
testcase_52 AC 402 ms
93,656 KB
testcase_53 AC 406 ms
95,364 KB
testcase_54 AC 483 ms
99,212 KB
testcase_55 AC 482 ms
99,472 KB
testcase_56 AC 520 ms
99,488 KB
testcase_57 AC 492 ms
99,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
from collections import defaultdict
import sys

def main():
    N, M = map(int, input().split())
    d = defaultdict(int)
    for _ in range(N):
        S, A = input().split()
        A = int(A)
        d[S] = A
    for _ in range(M):
        T, B = input().split()
        B = int(B)
        d[T] = B
    l = sorted(d.items(), key=lambda x:x[0])
    for k, v in l:
        print(k, v)
    return

if __name__ == '__main__':
    main()



# 301, 1

# 300 4 * 300 = 1200
0