結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー kazuma
提出日時 2018-12-07 15:25:20
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 341 bytes
コンパイル時間 2,214 ms
コンパイル使用メモリ 198,724 KB
最終ジャッジ日時 2025-01-06 18:38:35
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 46 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
	ios::sync_with_stdio(false), cin.tie(0);
	int N, M;
	cin >> N >> M;
	unordered_map<ll, int> cnt;
	for (int i = 0; i < N; i++) {
		ll A;
		cin >> A;
		cnt[A] += 1;
	}
	while (M--) {
		ll B;
		cin >> B;
		printf("%d%c", cnt[B], " \n"[M == 0]);
	}
	return 0;
}
0