結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー 西尾西尾
提出日時 2018-03-07 14:15:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 285 ms / 1,000 ms
コード長 355 bytes
コンパイル時間 1,696 ms
コンパイル使用メモリ 172,764 KB
実行使用メモリ 9,856 KB
最終ジャッジ日時 2024-10-01 21:25:37
合計ジャッジ時間 15,985 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main()
{
int i;
int N;
int M;
long long A;
long long B;
map<long long, int> Tbl;

	cin >> N;
	cin >> M;

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

	for( i = 0; i < M; i++ )
	{
		cin >> B;
		cout << Tbl[ B ];
		
		if( i == M - 1 )
			cout << endl;
		else
			cout << " ";
	}

	return 0;
}
0