結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー siman
提出日時 2022-08-12 14:06:15
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 610 bytes
コンパイル時間 1,147 ms
コンパイル使用メモリ 142,076 KB
実行使用メモリ 16,332 KB
最終ジャッジ日時 2024-09-22 16:43:24
合計ジャッジ時間 6,302 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12 TLE * 1 -- * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cassert>
#include <cmath>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include <climits>
#include <unordered_map>
#include <queue>
#include <set>
#include <cstring>
#include <vector>

using namespace std;
typedef long long ll;

int main() {
  int N, M;
  cin >> N >> M;
  vector<ll> A(N);
  vector<ll> B(M);
  unordered_map<ll, int> mp;

  for (int i = 0; i < N; ++i) {
    cin >> A[i];
    mp[A[i]]++;
  }

  for (int i = 0; i < M; ++i) {
    cin >> B[i];
  }

  for (int i = 0; i < M; ++i) {
    cout << mp[B[i]];
    if (i != M - 1) cout << " ";
  }
  cout << endl;

  return 0;
}
0