結果
| 問題 | No.1795 AtCoder Heuristic Rating coloring | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-01-12 19:59:03 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 697 ms / 2,000 ms | 
| コード長 | 276 bytes | 
| コンパイル時間 | 279 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 31,328 KB | 
| 最終ジャッジ日時 | 2024-11-15 11:56:05 | 
| 合計ジャッジ時間 | 16,341 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 54 | 
ソースコード
n,m=map(int,input().split()) from collections import defaultdict d=defaultdict(int) 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=[(k,v) for k,v in d.items()] ans.sort() for k,v in ans: print(k,v)
