結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー hgoto
提出日時 2021-01-14 08:49:27
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 320 bytes
コンパイル時間 2,590 ms
コンパイル使用メモリ 126,976 KB
実行使用メモリ 13,088 KB
最終ジャッジ日時 2024-11-23 21:20:20
合計ジャッジ時間 13,453 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 46 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <unordered_map>
using namespace std;
using ll = long long;

int main() {
	cin.tie(0)->sync_with_stdio(0);
	int n, m;
	cin >> n >> m;
	unordered_map<ll, int> mp;
	while (n--) {
		ll x;
		cin >> x;
		mp[x]++;
	}
	while (m--) {
		ll x;
		cin >> x;
		cout << mp[x] << (m > 0 ? ' ' : '\n');
	}
}
0