結果
| 問題 | No.1795 AtCoder Heuristic Rating coloring |
| コンテスト | |
| ユーザー |
Rute
|
| 提出日時 | 2021-12-24 00:20:33 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 530 ms / 2,000 ms |
| コード長 | 318 bytes |
| 記録 | |
| コンパイル時間 | 639 ms |
| コンパイル使用メモリ | 20,696 KB |
| 実行使用メモリ | 39,724 KB |
| 最終ジャッジ日時 | 2026-04-08 15:25:08 |
| 合計ジャッジ時間 | 14,929 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 54 |
ソースコード
import collections
d = {}
n,m = map(int,input().split())
for i in range(n):
s,a = input().split()
d[s] = int(a)
for j in range(m):
t,b = input().split()
d[t] = int(b)
c = collections.Counter(d)
ans = []
for i,j in c.items():
ans.append([i,j])
ans.sort()
for i in range(len(ans)):
print(*ans[i])
Rute