結果

問題 No.1795 AtCoder Heuristic Rating coloring
コンテスト
ユーザー harurun
提出日時 2021-11-14 18:22:49
言語 Python3
(3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
WA  
実行時間 -
コード長 306 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 293 ms
コンパイル使用メモリ 21,284 KB
実行使用メモリ 35,244 KB
最終ジャッジ日時 2026-08-30 09:50:07
合計ジャッジ時間 12,896 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3
other WA * 54
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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=list(d.items())
  for user,rate in ans:
    print(user,rate)
  return

main()

0