結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー kimiyuki
提出日時 2017-02-25 01:48:30
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
TLE  
実行時間 -
コード長 433 bytes
コンパイル時間 786 ms
コンパイル使用メモリ 74,280 KB
実行使用メモリ 13,200 KB
最終ジャッジ日時 2025-01-03 08:27:55
合計ジャッジ時間 20,141 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 46 TLE * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <unordered_map>
#define repeat(i,n) for (int i = 0; (i) < int(n); ++(i))
using ll = long long;
using namespace std;
int main() {
    int n, m; cin >> n >> m;
    unordered_map<ll, int> f;
    repeat (i,n) {
        ll a; cin >> a;
        f[a] += 1;
    }
    repeat (j,m) {
        ll b; cin >> b;
        int c = f.count(b) ? f[b] : 0;
        cout << c << ' ';
    }
    cout << endl;
    return 0;
}
0