結果

問題 No.3016 unordered_mapなるたけ落とすマン
ユーザー kimiyukikimiyuki
提出日時 2017-02-25 01:49:29
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 295 ms / 1,000 ms
コード長 476 bytes
コンパイル時間 672 ms
コンパイル使用メモリ 77,236 KB
実行使用メモリ 8,024 KB
最終ジャッジ日時 2023-09-01 21:57:13
合計ジャッジ時間 13,961 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 254 ms
7,724 KB
testcase_04 AC 263 ms
7,816 KB
testcase_05 AC 257 ms
7,748 KB
testcase_06 AC 267 ms
7,748 KB
testcase_07 AC 260 ms
7,788 KB
testcase_08 AC 257 ms
7,884 KB
testcase_09 AC 258 ms
8,012 KB
testcase_10 AC 259 ms
7,676 KB
testcase_11 AC 250 ms
8,024 KB
testcase_12 AC 255 ms
7,820 KB
testcase_13 AC 259 ms
7,792 KB
testcase_14 AC 254 ms
7,820 KB
testcase_15 AC 295 ms
7,884 KB
testcase_16 AC 249 ms
7,676 KB
testcase_17 AC 270 ms
7,824 KB
testcase_18 AC 259 ms
7,816 KB
testcase_19 AC 262 ms
7,716 KB
testcase_20 AC 253 ms
7,720 KB
testcase_21 AC 257 ms
7,820 KB
testcase_22 AC 252 ms
7,888 KB
testcase_23 AC 256 ms
7,816 KB
testcase_24 AC 252 ms
7,788 KB
testcase_25 AC 244 ms
7,748 KB
testcase_26 AC 245 ms
7,680 KB
testcase_27 AC 249 ms
7,788 KB
testcase_28 AC 240 ms
7,728 KB
testcase_29 AC 242 ms
7,820 KB
testcase_30 AC 237 ms
7,664 KB
testcase_31 AC 238 ms
7,712 KB
testcase_32 AC 237 ms
7,716 KB
testcase_33 AC 234 ms
7,828 KB
testcase_34 AC 235 ms
7,716 KB
testcase_35 AC 239 ms
7,748 KB
testcase_36 AC 237 ms
7,988 KB
testcase_37 AC 238 ms
7,728 KB
testcase_38 AC 240 ms
7,772 KB
testcase_39 AC 236 ms
7,816 KB
testcase_40 AC 234 ms
7,676 KB
testcase_41 AC 1 ms
4,376 KB
testcase_42 AC 2 ms
4,380 KB
testcase_43 AC 2 ms
4,380 KB
testcase_44 AC 20 ms
4,376 KB
testcase_45 AC 17 ms
4,376 KB
testcase_46 AC 18 ms
4,376 KB
testcase_47 AC 190 ms
4,376 KB
testcase_48 AC 180 ms
5,396 KB
testcase_49 AC 191 ms
4,508 KB
testcase_50 AC 229 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

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;
const ll mask = 0xdeadbeef;
int main() {
    int n, m; cin >> n >> m;
    unordered_map<ll, int> f;
    repeat (i,n) {
        ll a; cin >> a;
        f[a^mask] += 1;
    }
    repeat (j,m) {
        ll b; cin >> b;
        int c = f.count(b^mask) ? f[b^mask] : 0;
        cout << c << ' ';
    }
    cout << endl;
    return 0;
}
0