結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 220 ms
9,652 KB
testcase_04 AC 229 ms
9,620 KB
testcase_05 AC 226 ms
9,708 KB
testcase_06 AC 222 ms
9,604 KB
testcase_07 AC 225 ms
9,536 KB
testcase_08 AC 221 ms
9,620 KB
testcase_09 AC 220 ms
9,552 KB
testcase_10 AC 226 ms
9,684 KB
testcase_11 AC 219 ms
9,620 KB
testcase_12 AC 228 ms
9,644 KB
testcase_13 AC 221 ms
9,548 KB
testcase_14 AC 226 ms
9,564 KB
testcase_15 AC 219 ms
9,708 KB
testcase_16 AC 216 ms
9,556 KB
testcase_17 AC 218 ms
9,584 KB
testcase_18 AC 221 ms
9,644 KB
testcase_19 AC 218 ms
9,648 KB
testcase_20 AC 215 ms
9,624 KB
testcase_21 AC 217 ms
9,840 KB
testcase_22 AC 213 ms
9,584 KB
testcase_23 AC 218 ms
9,560 KB
testcase_24 AC 210 ms
9,708 KB
testcase_25 AC 215 ms
9,684 KB
testcase_26 AC 212 ms
9,552 KB
testcase_27 AC 214 ms
9,556 KB
testcase_28 AC 209 ms
9,648 KB
testcase_29 AC 209 ms
9,704 KB
testcase_30 AC 210 ms
9,616 KB
testcase_31 AC 208 ms
9,532 KB
testcase_32 AC 205 ms
9,688 KB
testcase_33 AC 205 ms
9,564 KB
testcase_34 AC 203 ms
9,668 KB
testcase_35 AC 203 ms
9,528 KB
testcase_36 AC 199 ms
9,600 KB
testcase_37 AC 202 ms
9,540 KB
testcase_38 AC 207 ms
9,508 KB
testcase_39 AC 202 ms
9,544 KB
testcase_40 AC 195 ms
9,540 KB
testcase_41 AC 1 ms
4,376 KB
testcase_42 AC 1 ms
4,376 KB
testcase_43 AC 1 ms
4,380 KB
testcase_44 AC 18 ms
4,376 KB
testcase_45 AC 16 ms
4,376 KB
testcase_46 AC 17 ms
4,376 KB
testcase_47 AC 182 ms
7,232 KB
testcase_48 AC 173 ms
7,548 KB
testcase_49 AC 186 ms
7,560 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] << " \n"[i + 1 == M];
  }
}
0