結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー kiyoshi0205kiyoshi0205
提出日時 2023-05-15 21:47:11
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 235 ms / 1,000 ms
コード長 322 bytes
コンパイル時間 725 ms
コンパイル使用メモリ 88,812 KB
実行使用メモリ 9,828 KB
最終ジャッジ日時 2023-08-20 21:01:31
合計ジャッジ時間 12,817 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 215 ms
9,560 KB
testcase_04 AC 230 ms
9,672 KB
testcase_05 AC 230 ms
9,556 KB
testcase_06 AC 225 ms
9,668 KB
testcase_07 AC 232 ms
9,644 KB
testcase_08 AC 235 ms
9,828 KB
testcase_09 AC 230 ms
9,656 KB
testcase_10 AC 232 ms
9,656 KB
testcase_11 AC 229 ms
9,552 KB
testcase_12 AC 232 ms
9,700 KB
testcase_13 AC 224 ms
9,608 KB
testcase_14 AC 224 ms
9,608 KB
testcase_15 AC 223 ms
9,764 KB
testcase_16 AC 227 ms
9,604 KB
testcase_17 AC 223 ms
9,552 KB
testcase_18 AC 220 ms
9,556 KB
testcase_19 AC 225 ms
9,604 KB
testcase_20 AC 217 ms
9,552 KB
testcase_21 AC 216 ms
9,760 KB
testcase_22 AC 222 ms
9,596 KB
testcase_23 AC 214 ms
9,608 KB
testcase_24 AC 220 ms
9,592 KB
testcase_25 AC 217 ms
9,588 KB
testcase_26 AC 214 ms
9,704 KB
testcase_27 AC 214 ms
9,592 KB
testcase_28 AC 211 ms
9,592 KB
testcase_29 AC 212 ms
9,564 KB
testcase_30 AC 209 ms
9,592 KB
testcase_31 AC 207 ms
9,648 KB
testcase_32 AC 203 ms
9,584 KB
testcase_33 AC 205 ms
9,636 KB
testcase_34 AC 207 ms
9,632 KB
testcase_35 AC 210 ms
9,712 KB
testcase_36 AC 206 ms
9,672 KB
testcase_37 AC 201 ms
9,564 KB
testcase_38 AC 198 ms
9,504 KB
testcase_39 AC 204 ms
9,492 KB
testcase_40 AC 202 ms
9,568 KB
testcase_41 AC 1 ms
4,376 KB
testcase_42 AC 1 ms
4,376 KB
testcase_43 AC 1 ms
4,376 KB
testcase_44 AC 19 ms
4,376 KB
testcase_45 AC 16 ms
4,376 KB
testcase_46 AC 18 ms
4,380 KB
testcase_47 AC 190 ms
7,192 KB
testcase_48 AC 175 ms
7,656 KB
testcase_49 AC 189 ms
7,680 KB
testcase_50 AC 196 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>

int main()
{
  int N, M;
  std::cin >> N >> M;
  std::map<long long, int> cnt_map;
  for (int i = 0; i < N; i++)
  {
    long long a;
    std::cin >> a;
    cnt_map[a]++;
  }
  for (int i = 0; i < M; i++)
  {
    long long b;
    std::cin >> b;
    std::cout << cnt_map[b] << " ";
  }
}
0