結果

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

ソースコード

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]++;
    }
    int b;
    for (auto j = 0; j < m; j++)
    {
        std::cin >> b;
        std::cout << table[b];
        if (j < m - 1)
        {
            std::cout << ' ';
        }
        else
        {
            std::cout << std::endl;
        }
    }
    return EXIT_SUCCESS;
}
0