結果

問題 No.8016 unordered_mapなるたけ落とすマン
ユーザー はむ吉🐹
提出日時 2016-05-26 12:22:23
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 82 ms / 1,000 ms
コード長 552 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 76,580 KB
実行使用メモリ 9,728 KB
最終ジャッジ日時 2024-10-11 05:09:28
合計ジャッジ時間 6,623 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdlib>
#include <iostream>
#include <map>


int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    int n, m;
    std::cin >> n >> m;
    std::map<long long, int> table;
    long long a;
    for (auto i = 0; i < n; i++)
    {
        std::cin >> a;
        table[a]++;
    }
    long long b;
    for (auto j = 0; j < m; j++)
    {
        std::cin >> b;
        if (j > 0)
        {
            std::cout << " ";
        }
        std::cout << table[b];
    }
    std::cout << std::endl;
    return EXIT_SUCCESS;
}
0