結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー okkuu
提出日時 2022-08-19 15:19:39
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 164 ms / 1,000 ms
+ 304µs
コード長 621 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,376 ms
コンパイル使用メモリ 222,664 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2026-09-11 17:32:21
合計ジャッジ時間 13,260 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<cmath>
#include<string>
#include<iomanip>
#include<numeric>
#include<queue>
#include<deque>
#include<stack>
#include<set>
#include<map>
#include<random>
#include<bitset>
#include<cassert>
#include<complex>
#include<fstream>
#include<cstdlib>
using namespace std;
typedef long long ll;
const int mod=998244353;
const int dx[]={1,0,0,-1},dy[]={0,1,-1,0};
int main(){
	int n,m;
	ll a,b;
	map<ll,int>mp;
	cin>>n>>m;
	for(int i=0;i<n;i++){
		cin>>a;
		mp[a]++;
	}
	for(int i=0;i<m;i++){
		cin>>b;
		cout<<mp[b]<<(i+1==m?'\n':' ');
	}
}
0