結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー harurunharurun
提出日時 2021-11-14 18:23:32
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 516 ms / 2,000 ms
コード長 332 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 11,880 KB
実行使用メモリ 33,980 KB
最終ジャッジ日時 2023-10-20 07:22:12
合計ジャッジ時間 15,546 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,068 KB
testcase_01 AC 27 ms
10,068 KB
testcase_02 AC 28 ms
10,068 KB
testcase_03 AC 28 ms
10,072 KB
testcase_04 AC 38 ms
10,508 KB
testcase_05 AC 37 ms
10,508 KB
testcase_06 AC 40 ms
10,532 KB
testcase_07 AC 38 ms
10,552 KB
testcase_08 AC 38 ms
10,564 KB
testcase_09 AC 39 ms
10,656 KB
testcase_10 AC 39 ms
10,616 KB
testcase_11 AC 38 ms
10,572 KB
testcase_12 AC 29 ms
10,072 KB
testcase_13 AC 28 ms
10,080 KB
testcase_14 AC 28 ms
10,076 KB
testcase_15 AC 28 ms
10,072 KB
testcase_16 AC 28 ms
10,080 KB
testcase_17 AC 29 ms
10,076 KB
testcase_18 AC 29 ms
10,076 KB
testcase_19 AC 28 ms
10,072 KB
testcase_20 AC 31 ms
10,084 KB
testcase_21 AC 31 ms
10,076 KB
testcase_22 AC 31 ms
10,076 KB
testcase_23 AC 31 ms
10,076 KB
testcase_24 AC 31 ms
10,080 KB
testcase_25 AC 29 ms
10,076 KB
testcase_26 AC 28 ms
10,076 KB
testcase_27 AC 31 ms
10,080 KB
testcase_28 AC 29 ms
10,072 KB
testcase_29 AC 29 ms
10,080 KB
testcase_30 AC 30 ms
10,076 KB
testcase_31 AC 30 ms
10,072 KB
testcase_32 AC 246 ms
17,932 KB
testcase_33 AC 166 ms
16,592 KB
testcase_34 AC 353 ms
21,456 KB
testcase_35 AC 303 ms
20,152 KB
testcase_36 AC 326 ms
22,216 KB
testcase_37 AC 196 ms
16,852 KB
testcase_38 AC 201 ms
17,140 KB
testcase_39 AC 375 ms
22,236 KB
testcase_40 AC 267 ms
18,440 KB
testcase_41 AC 346 ms
21,444 KB
testcase_42 AC 218 ms
17,912 KB
testcase_43 AC 232 ms
18,968 KB
testcase_44 AC 297 ms
21,424 KB
testcase_45 AC 222 ms
17,912 KB
testcase_46 AC 379 ms
22,740 KB
testcase_47 AC 113 ms
13,720 KB
testcase_48 AC 236 ms
18,460 KB
testcase_49 AC 429 ms
23,008 KB
testcase_50 AC 221 ms
17,120 KB
testcase_51 AC 200 ms
16,592 KB
testcase_52 AC 436 ms
24,964 KB
testcase_53 AC 435 ms
24,968 KB
testcase_54 AC 513 ms
33,980 KB
testcase_55 AC 509 ms
33,976 KB
testcase_56 AC 516 ms
33,980 KB
testcase_57 AC 515 ms
33,972 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
def main():
  N,M=map(int,input().split())
  d=Counter()
  for i in range(N):
    S,A=input().split()
    d[S]=int(A)
  for i in range(M):
    T,B=input().split()
    d[T]=max(d[T],int(B))
  ans=sorted(list(d.items()),key=lambda x:x[0])
  for user,rate in ans:
    print(user,rate)
  return

main()

0