結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー zeosutt
提出日時 2016-05-22 04:38:56
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 684 ms
コンパイル使用メモリ 66,780 KB
実行使用メモリ 9,600 KB
最終ジャッジ日時 2024-10-07 06:29:17
合計ジャッジ時間 6,825 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <map>

using namespace std;

int main() {
    cin.tie(NULL);
    ios::sync_with_stdio(false);

    int n, m;
    map<long long, int> cnt;

    cin >> n >> m;
    while (n--) {
        long long a;
        cin >> a;
        cnt[a]++;
    }
    while (m--) {
        long long b;
        cin >> b;
        cout << cnt[b] << " \n"[!m];
    }

    return 0;
}
0