結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー forest3forest3
提出日時 2021-12-26 22:19:53
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 1,626 ms
コンパイル使用メモリ 175,620 KB
実行使用メモリ 14,652 KB
最終ジャッジ日時 2023-10-24 17:46:24
合計ジャッジ時間 11,396 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 1 ms
4,348 KB
testcase_04 AC 6 ms
4,348 KB
testcase_05 AC 6 ms
4,348 KB
testcase_06 AC 7 ms
4,348 KB
testcase_07 AC 7 ms
4,348 KB
testcase_08 AC 7 ms
4,348 KB
testcase_09 AC 8 ms
4,348 KB
testcase_10 AC 8 ms
4,348 KB
testcase_11 AC 7 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 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 1 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 1 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 104 ms
6,664 KB
testcase_33 AC 71 ms
6,092 KB
testcase_34 AC 152 ms
7,776 KB
testcase_35 AC 132 ms
7,272 KB
testcase_36 AC 155 ms
8,104 KB
testcase_37 AC 86 ms
6,280 KB
testcase_38 AC 84 ms
6,424 KB
testcase_39 AC 167 ms
8,108 KB
testcase_40 AC 111 ms
6,972 KB
testcase_41 AC 150 ms
7,808 KB
testcase_42 AC 100 ms
6,696 KB
testcase_43 AC 110 ms
7,112 KB
testcase_44 AC 140 ms
7,844 KB
testcase_45 AC 102 ms
6,712 KB
testcase_46 AC 170 ms
8,368 KB
testcase_47 AC 45 ms
5,124 KB
testcase_48 AC 103 ms
6,908 KB
testcase_49 AC 181 ms
8,460 KB
testcase_50 AC 96 ms
6,340 KB
testcase_51 AC 86 ms
6,176 KB
testcase_52 AC 222 ms
10,840 KB
testcase_53 AC 224 ms
10,816 KB
testcase_54 AC 291 ms
14,652 KB
testcase_55 AC 288 ms
14,652 KB
testcase_56 AC 287 ms
14,652 KB
testcase_57 AC 295 ms
14,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
	int N, M;
	cin >> N >> M;
	map<string, int> mp;
	for( int i = 0; i < N; i++ ) {
		string S;
		int A;
		cin >> S >> A;
		mp[S] = A;
	}
	for( int i = 0; i < M; i++ ) {
		string T;
		int B;
		cin >> T >> B;
		mp[T] = B;
	}

	for( auto it = mp.begin(); it != mp.end(); it++ ) {
		cout << it->first << " " << it->second << endl;
	}
}
0