結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー hanyuhanyu
提出日時 2020-09-23 00:38:59
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 94 ms / 1,000 ms
コード長 426 bytes
コンパイル時間 1,570 ms
コンパイル使用メモリ 171,264 KB
実行使用メモリ 9,860 KB
最終ジャッジ日時 2023-09-09 08:14:15
合計ジャッジ時間 10,590 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 AC 87 ms
9,616 KB
testcase_04 AC 94 ms
9,860 KB
testcase_05 AC 93 ms
9,612 KB
testcase_06 AC 93 ms
9,616 KB
testcase_07 AC 93 ms
9,672 KB
testcase_08 AC 94 ms
9,852 KB
testcase_09 AC 93 ms
9,736 KB
testcase_10 AC 91 ms
9,684 KB
testcase_11 AC 91 ms
9,616 KB
testcase_12 AC 92 ms
9,624 KB
testcase_13 AC 91 ms
9,648 KB
testcase_14 AC 91 ms
9,612 KB
testcase_15 AC 90 ms
9,852 KB
testcase_16 AC 90 ms
9,612 KB
testcase_17 AC 92 ms
9,672 KB
testcase_18 AC 91 ms
9,616 KB
testcase_19 AC 91 ms
9,776 KB
testcase_20 AC 91 ms
9,692 KB
testcase_21 AC 90 ms
9,612 KB
testcase_22 AC 88 ms
9,612 KB
testcase_23 AC 88 ms
9,816 KB
testcase_24 AC 88 ms
9,612 KB
testcase_25 AC 86 ms
9,816 KB
testcase_26 AC 83 ms
9,684 KB
testcase_27 AC 83 ms
9,608 KB
testcase_28 AC 81 ms
9,612 KB
testcase_29 AC 80 ms
9,856 KB
testcase_30 AC 78 ms
9,604 KB
testcase_31 AC 77 ms
9,604 KB
testcase_32 AC 78 ms
9,660 KB
testcase_33 AC 74 ms
9,608 KB
testcase_34 AC 73 ms
9,592 KB
testcase_35 AC 72 ms
9,668 KB
testcase_36 AC 71 ms
9,580 KB
testcase_37 AC 71 ms
9,584 KB
testcase_38 AC 70 ms
9,556 KB
testcase_39 AC 68 ms
9,556 KB
testcase_40 AC 68 ms
9,524 KB
testcase_41 AC 2 ms
4,384 KB
testcase_42 AC 1 ms
4,384 KB
testcase_43 AC 2 ms
4,380 KB
testcase_44 AC 6 ms
4,384 KB
testcase_45 AC 6 ms
4,380 KB
testcase_46 AC 6 ms
4,384 KB
testcase_47 AC 59 ms
5,084 KB
testcase_48 AC 69 ms
6,104 KB
testcase_49 AC 66 ms
5,656 KB
testcase_50 AC 38 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

using ll = long long;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  int n, m;
  cin >> n >> m;
  
  map<ll, int> mp;
  for (int i = 0; i < n; i++) {
    ll a;
    cin >> a;
    mp[a]++;
  }
  
  for (int i = 0; i < m; i++) {
    ll b;
    cin >> b;
    if (i) cout << " ";
    if (mp.find(b) == mp.end()) cout << 0;
    else cout << mp[b];
  }
  cout << '\n';
}
0