結果

問題 No.1795 AtCoder Heuristic Rating coloring
ユーザー tnakao0123tnakao0123
提出日時 2021-12-24 16:45:36
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 156 ms / 2,000 ms
コード長 570 bytes
コンパイル時間 731 ms
コンパイル使用メモリ 72,004 KB
実行使用メモリ 14,256 KB
最終ジャッジ日時 2023-10-20 07:54:58
合計ジャッジ時間 5,604 ms
ジャッジサーバーID
(参考情報)
judge11 / 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 1 ms
4,348 KB
testcase_04 AC 3 ms
4,348 KB
testcase_05 AC 3 ms
4,348 KB
testcase_06 AC 3 ms
4,348 KB
testcase_07 AC 3 ms
4,348 KB
testcase_08 AC 3 ms
4,348 KB
testcase_09 AC 4 ms
4,348 KB
testcase_10 AC 4 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 1 ms
4,348 KB
testcase_15 AC 1 ms
4,348 KB
testcase_16 AC 1 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 1 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 1 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 45 ms
6,268 KB
testcase_33 AC 31 ms
5,696 KB
testcase_34 AC 73 ms
7,380 KB
testcase_35 AC 62 ms
6,876 KB
testcase_36 AC 69 ms
7,708 KB
testcase_37 AC 37 ms
5,884 KB
testcase_38 AC 34 ms
6,028 KB
testcase_39 AC 78 ms
7,712 KB
testcase_40 AC 50 ms
6,576 KB
testcase_41 AC 72 ms
7,412 KB
testcase_42 AC 42 ms
6,300 KB
testcase_43 AC 45 ms
6,716 KB
testcase_44 AC 58 ms
7,448 KB
testcase_45 AC 43 ms
6,316 KB
testcase_46 AC 83 ms
7,972 KB
testcase_47 AC 19 ms
4,728 KB
testcase_48 AC 40 ms
6,512 KB
testcase_49 AC 85 ms
8,064 KB
testcase_50 AC 42 ms
5,944 KB
testcase_51 AC 37 ms
5,780 KB
testcase_52 AC 122 ms
10,444 KB
testcase_53 AC 124 ms
10,420 KB
testcase_54 AC 152 ms
14,256 KB
testcase_55 AC 154 ms
14,256 KB
testcase_56 AC 156 ms
14,256 KB
testcase_57 AC 152 ms
14,256 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 1795.cc:  No.1795 AtCoder Heuristic Rating coloring - yukicoder
 */

#include<cstdio>
#include<string>
#include<map>
#include<algorithm>
 
using namespace std;

/* constant */

/* typedef */

typedef map<string,int> msi;

/* global variables */

msi nms;

/* subroutines */

/* main */

int main() {
  int n, m;
  scanf("%d%d", &n, &m);

  for (int i = 0; i < n + m; i++) {
    char s[32];
    int a;
    scanf("%s%d", s, &a);
    nms[string(s)] = a;
  }

  for (auto na: nms) printf("%s %d\n", na.first.c_str(), na.second);
  return 0;
}
0