結果
問題 | No.1795 AtCoder Heuristic Rating coloring |
ユーザー |
![]() |
提出日時 | 2022-03-04 20:51:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 301 ms / 2,000 ms |
コード長 | 561 bytes |
コンパイル時間 | 1,917 ms |
コンパイル使用メモリ | 175,052 KB |
実行使用メモリ | 14,592 KB |
最終ジャッジ日時 | 2024-07-18 18:15:41 |
合計ジャッジ時間 | 9,619 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 54 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(void) { int n, m; cin >> n >> m; map<string, int> s; map<string, int> t; for (int i = 1; i <= n; i++) { string s_tmp; int a_tmp; cin >> s_tmp >> a_tmp; s[s_tmp] = a_tmp; } for (int i = 1; i <= m; i++) { string s_tmp; int a_tmp; cin >> s_tmp >> a_tmp; s[s_tmp] = a_tmp; } for (auto itr = s.begin(); itr != s.end(); itr++) { cout << itr->first << " " << itr->second << endl; } return 0; }