結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー keisuke6keisuke6
提出日時 2022-11-10 07:31:56
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 444 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 3,912 ms
コンパイル使用メモリ 213,512 KB
実行使用メモリ 25,372 KB
最終ジャッジ日時 2023-09-30 17:15:54
合計ジャッジ時間 16,497 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 7 ms
4,376 KB
testcase_05 AC 7 ms
4,376 KB
testcase_06 AC 9 ms
4,380 KB
testcase_07 AC 9 ms
4,380 KB
testcase_08 AC 9 ms
4,376 KB
testcase_09 AC 10 ms
4,376 KB
testcase_10 AC 10 ms
4,376 KB
testcase_11 AC 9 ms
4,380 KB
testcase_12 AC 1 ms
4,380 KB
testcase_13 AC 2 ms
4,380 KB
testcase_14 AC 1 ms
4,376 KB
testcase_15 AC 1 ms
4,380 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 2 ms
4,376 KB
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 2 ms
4,380 KB
testcase_22 AC 2 ms
4,376 KB
testcase_23 AC 2 ms
4,376 KB
testcase_24 AC 2 ms
4,380 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 2 ms
4,380 KB
testcase_30 AC 2 ms
4,380 KB
testcase_31 AC 2 ms
4,376 KB
testcase_32 AC 152 ms
9,284 KB
testcase_33 AC 110 ms
8,060 KB
testcase_34 AC 232 ms
11,504 KB
testcase_35 AC 195 ms
10,488 KB
testcase_36 AC 230 ms
12,340 KB
testcase_37 AC 125 ms
8,528 KB
testcase_38 AC 123 ms
8,800 KB
testcase_39 AC 247 ms
12,280 KB
testcase_40 AC 167 ms
9,820 KB
testcase_41 AC 227 ms
11,488 KB
testcase_42 AC 146 ms
9,388 KB
testcase_43 AC 160 ms
10,096 KB
testcase_44 AC 205 ms
11,556 KB
testcase_45 AC 152 ms
9,368 KB
testcase_46 AC 258 ms
12,616 KB
testcase_47 AC 68 ms
6,128 KB
testcase_48 AC 151 ms
9,940 KB
testcase_49 AC 275 ms
12,860 KB
testcase_50 AC 140 ms
8,620 KB
testcase_51 AC 124 ms
8,348 KB
testcase_52 AC 341 ms
17,680 KB
testcase_53 AC 339 ms
17,564 KB
testcase_54 AC 444 ms
25,176 KB
testcase_55 AC 441 ms
25,364 KB
testcase_56 AC 431 ms
25,308 KB
testcase_57 AC 435 ms
25,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
    int N,M;
    cin>>N>>M;
    set<string> s;
    map<string,int> m;
    for(int i=0;i<N+M;i++){
        string S;
        cin>>S;
        int x;
        cin>>x;
        s.insert(S);
        m[S]=x;
    }
    while(!s.empty()){
        auto p = *s.begin();
        s.erase(p);
        cout<<p<<' '<<m[p]<<endl;
    }
}
0