結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー 👑 NachiaNachia
提出日時 2021-12-24 00:02:22
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 212 ms / 2,000 ms
コード長 536 bytes
コンパイル時間 855 ms
コンパイル使用メモリ 89,204 KB
実行使用メモリ 14,544 KB
最終ジャッジ日時 2023-10-20 07:40:25
合計ジャッジ時間 6,584 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 4 ms
4,348 KB
testcase_05 AC 4 ms
4,348 KB
testcase_06 AC 5 ms
4,348 KB
testcase_07 AC 4 ms
4,348 KB
testcase_08 AC 5 ms
4,348 KB
testcase_09 AC 5 ms
4,348 KB
testcase_10 AC 5 ms
4,348 KB
testcase_11 AC 4 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 3 ms
4,348 KB
testcase_15 AC 2 ms
4,348 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 2 ms
4,348 KB
testcase_20 AC 2 ms
4,348 KB
testcase_21 AC 2 ms
4,348 KB
testcase_22 AC 2 ms
4,348 KB
testcase_23 AC 2 ms
4,348 KB
testcase_24 AC 2 ms
4,348 KB
testcase_25 AC 2 ms
4,348 KB
testcase_26 AC 2 ms
4,348 KB
testcase_27 AC 2 ms
4,348 KB
testcase_28 AC 2 ms
4,348 KB
testcase_29 AC 2 ms
4,348 KB
testcase_30 AC 2 ms
4,348 KB
testcase_31 AC 2 ms
4,348 KB
testcase_32 AC 65 ms
6,556 KB
testcase_33 AC 43 ms
5,984 KB
testcase_34 AC 102 ms
7,668 KB
testcase_35 AC 88 ms
7,164 KB
testcase_36 AC 103 ms
7,996 KB
testcase_37 AC 54 ms
6,172 KB
testcase_38 AC 49 ms
6,316 KB
testcase_39 AC 117 ms
8,000 KB
testcase_40 AC 72 ms
6,864 KB
testcase_41 AC 106 ms
7,700 KB
testcase_42 AC 61 ms
6,588 KB
testcase_43 AC 67 ms
7,004 KB
testcase_44 AC 87 ms
7,736 KB
testcase_45 AC 66 ms
6,604 KB
testcase_46 AC 118 ms
8,260 KB
testcase_47 AC 28 ms
5,016 KB
testcase_48 AC 60 ms
6,800 KB
testcase_49 AC 128 ms
8,352 KB
testcase_50 AC 61 ms
6,232 KB
testcase_51 AC 54 ms
6,068 KB
testcase_52 AC 174 ms
10,732 KB
testcase_53 AC 177 ms
10,708 KB
testcase_54 AC 210 ms
14,544 KB
testcase_55 AC 207 ms
14,544 KB
testcase_56 AC 212 ms
14,544 KB
testcase_57 AC 211 ms
14,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
#define rep(i,n) for(int i=0; i<(n); i++)

int main() {
    int N,M; cin >> N >> M;
    map<string, int> A;
    rep(i,N){
        string s; int a; cin >> s >> a;
        A[s] = a;
    }
    rep(i,M){
        string s; int a; cin >> s >> a;
        A[s] = a;
    }
    
    for(auto [s,a] : A){
        cout << s << " " << a << "\n";
    }
    return 0;
}
0