結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー Natsu_umidigiNatsu_umidigi
提出日時 2022-03-04 20:51:36
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 336 ms / 2,000 ms
コード長 561 bytes
コンパイル時間 1,576 ms
コンパイル使用メモリ 174,248 KB
実行使用メモリ 14,360 KB
最終ジャッジ日時 2023-09-25 22:35:33
合計ジャッジ時間 9,903 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 7 ms
4,380 KB
testcase_05 AC 7 ms
4,380 KB
testcase_06 AC 7 ms
4,376 KB
testcase_07 AC 7 ms
4,376 KB
testcase_08 AC 8 ms
4,376 KB
testcase_09 AC 8 ms
4,376 KB
testcase_10 AC 8 ms
4,380 KB
testcase_11 AC 7 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 2 ms
4,376 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 AC 1 ms
4,380 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,376 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 1 ms
4,380 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,380 KB
testcase_28 AC 1 ms
4,376 KB
testcase_29 AC 2 ms
4,376 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 AC 111 ms
6,364 KB
testcase_33 AC 78 ms
5,808 KB
testcase_34 AC 162 ms
7,472 KB
testcase_35 AC 138 ms
6,932 KB
testcase_36 AC 168 ms
7,816 KB
testcase_37 AC 91 ms
5,936 KB
testcase_38 AC 91 ms
6,140 KB
testcase_39 AC 179 ms
7,808 KB
testcase_40 AC 121 ms
6,676 KB
testcase_41 AC 163 ms
7,628 KB
testcase_42 AC 107 ms
6,392 KB
testcase_43 AC 116 ms
7,028 KB
testcase_44 AC 145 ms
7,504 KB
testcase_45 AC 109 ms
6,412 KB
testcase_46 AC 187 ms
8,020 KB
testcase_47 AC 48 ms
4,764 KB
testcase_48 AC 110 ms
6,564 KB
testcase_49 AC 199 ms
8,164 KB
testcase_50 AC 100 ms
5,996 KB
testcase_51 AC 92 ms
5,952 KB
testcase_52 AC 236 ms
10,616 KB
testcase_53 AC 230 ms
10,528 KB
testcase_54 AC 336 ms
14,300 KB
testcase_55 AC 309 ms
14,308 KB
testcase_56 AC 314 ms
14,360 KB
testcase_57 AC 316 ms
14,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0