結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,384 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 217 ms
9,664 KB
testcase_04 AC 227 ms
9,580 KB
testcase_05 AC 225 ms
9,724 KB
testcase_06 AC 223 ms
9,584 KB
testcase_07 AC 227 ms
9,596 KB
testcase_08 AC 225 ms
9,588 KB
testcase_09 AC 274 ms
9,572 KB
testcase_10 AC 222 ms
9,572 KB
testcase_11 AC 220 ms
9,668 KB
testcase_12 AC 219 ms
9,608 KB
testcase_13 AC 215 ms
9,604 KB
testcase_14 AC 216 ms
9,628 KB
testcase_15 AC 217 ms
9,664 KB
testcase_16 AC 213 ms
9,588 KB
testcase_17 AC 213 ms
9,716 KB
testcase_18 AC 215 ms
9,608 KB
testcase_19 AC 218 ms
9,604 KB
testcase_20 AC 216 ms
9,596 KB
testcase_21 AC 213 ms
9,572 KB
testcase_22 AC 211 ms
9,616 KB
testcase_23 AC 215 ms
9,596 KB
testcase_24 AC 211 ms
9,664 KB
testcase_25 AC 210 ms
9,660 KB
testcase_26 AC 205 ms
9,616 KB
testcase_27 AC 202 ms
9,612 KB
testcase_28 AC 210 ms
9,652 KB
testcase_29 AC 228 ms
9,624 KB
testcase_30 AC 209 ms
9,572 KB
testcase_31 AC 206 ms
9,580 KB
testcase_32 AC 208 ms
9,592 KB
testcase_33 AC 202 ms
9,608 KB
testcase_34 AC 203 ms
9,648 KB
testcase_35 AC 198 ms
9,596 KB
testcase_36 AC 198 ms
9,624 KB
testcase_37 AC 198 ms
9,556 KB
testcase_38 AC 199 ms
9,596 KB
testcase_39 AC 194 ms
9,556 KB
testcase_40 AC 196 ms
9,504 KB
testcase_41 AC 1 ms
4,376 KB
testcase_42 AC 1 ms
4,380 KB
testcase_43 AC 1 ms
4,376 KB
testcase_44 AC 18 ms
4,384 KB
testcase_45 AC 16 ms
4,380 KB
testcase_46 AC 16 ms
4,380 KB
testcase_47 AC 180 ms
7,252 KB
testcase_48 AC 174 ms
7,696 KB
testcase_49 AC 181 ms
7,628 KB
testcase_50 AC 190 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