結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー zeosuttzeosutt
提出日時 2016-05-17 13:54:23
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 284 ms / 1,000 ms
コード長 272 bytes
コンパイル時間 745 ms
コンパイル使用メモリ 67,180 KB
実行使用メモリ 9,728 KB
最終ジャッジ日時 2024-10-07 05:05:13
合計ジャッジ時間 15,679 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>

using namespace std;

int main() {
	int n, m;
	map<long long, int> cnt;

	cin >> n >> m;
	while (n--) {
		long long a;
		cin >> a;
		cnt[a]++;
	}
	while (m--) {
		long long b;
		cin >> b;
		cout << cnt[b] << " \n"[!m];
	}

	return 0;
}
0