結果
| 問題 | 
                            No.8016 unordered_mapなるたけ落とすマン
                             | 
                    
| ユーザー | 
                             | 
                    
| 提出日時 | 2022-03-26 14:41:46 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 332 ms / 1,000 ms | 
| コード長 | 362 bytes | 
| コンパイル時間 | 2,248 ms | 
| コンパイル使用メモリ | 199,180 KB | 
| 最終ジャッジ日時 | 2025-01-28 12:57:42 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 48 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(void){
    int n, m;
    cin >> n >> m;
    map<long long, int> mp;
    long long a;
    for(int i = 0; i < n; i++){
        cin >> a;
        mp[a]++;
    }
    for(int i = 0; i < m; i++){
        cin >> a;
        cout << mp[a];
        if(i == m - 1) cout << "\n";
        else cout << " ";
    }
    
}