結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー motimoti
提出日時 2018-11-11 16:46:20
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 488 bytes
コンパイル時間 957 ms
コンパイル使用メモリ 99,148 KB
実行使用メモリ 10,580 KB
最終ジャッジ日時 2023-08-20 10:59:02
合計ジャッジ時間 6,520 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 4 ms
7,328 KB
testcase_01 AC 4 ms
7,304 KB
testcase_02 AC 3 ms
7,300 KB
testcase_03 AC 246 ms
10,556 KB
testcase_04 AC 259 ms
10,516 KB
testcase_05 AC 261 ms
10,580 KB
testcase_06 AC 259 ms
10,508 KB
testcase_07 AC 252 ms
10,484 KB
testcase_08 AC 252 ms
10,480 KB
testcase_09 AC 257 ms
10,512 KB
testcase_10 AC 256 ms
10,496 KB
testcase_11 TLE -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <unordered_map>
#include <iostream>
#include <random>
int main() {
    int n, m;
    std::cin >> n >> m;
    std::unordered_map<int64_t, int> mp;
    int offset = std::random_device()();
    mp.reserve(500000);
    for (int i = 0; i < n; i++) {
        int64_t x; std::cin >> x;
        mp[x + offset]++;
    }
    for (int i = 0; i < m; i++) {
        int64_t x; std::cin >> x;
        if (i) std::cout << " ";
        std::cout << mp[x + offset];
    }
    std::cout << "\n";
}
0