結果

問題 No.206 数の積集合を求めるクエリ
ユーザー pekempeypekempey
提出日時 2015-05-12 19:46:32
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 565 bytes
コンパイル時間 3,531 ms
コンパイル使用メモリ 145,028 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-20 04:34:25
合計ジャッジ時間 11,353 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 3 ms
4,380 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 3 ms
4,384 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 3 ms
4,384 KB
testcase_12 AC 29 ms
4,384 KB
testcase_13 AC 25 ms
4,376 KB
testcase_14 AC 28 ms
4,376 KB
testcase_15 AC 28 ms
4,380 KB
testcase_16 AC 28 ms
4,376 KB
testcase_17 AC 52 ms
4,380 KB
testcase_18 AC 27 ms
4,380 KB
testcase_19 AC 47 ms
4,380 KB
testcase_20 AC 27 ms
4,376 KB
testcase_21 AC 33 ms
4,376 KB
testcase_22 AC 33 ms
4,380 KB
testcase_23 AC 49 ms
4,380 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 910 ms
4,376 KB
testcase_29 WA -
testcase_30 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define fr(i, a, b) for (int i = (a); i < (b); i++)
using namespace std;
typedef long long ll;
const ll inf = 1e9;
const ll mod = 1e9 + 7;

typedef bitset<100000> BIT;

int L, M, N;
BIT A, B;
int Q;

int main() {
    cin >> L >> M >> N;

    rep (i, L) {
        int a;
        cin >> a;
        A[a] = true;
    }

    rep (i, M) {
        int b;
        cin >> b;
        B[b] = true;
    }

    cin >> Q;

    rep (i, Q) {
        cout << (A & B).count() << endl;
        B <<= 1;
    }
}
0