結果

問題 No.206 数の積集合を求めるクエリ
ユーザー rlangevinrlangevin
提出日時 2024-01-09 08:53:08
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 849 ms / 7,000 ms
コード長 551 bytes
コンパイル時間 6,493 ms
コンパイル使用メモリ 308,836 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-09 08:53:24
合計ジャッジ時間 15,238 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 3 ms
6,676 KB
testcase_07 AC 3 ms
6,676 KB
testcase_08 AC 3 ms
6,676 KB
testcase_09 AC 3 ms
6,676 KB
testcase_10 AC 3 ms
6,676 KB
testcase_11 AC 3 ms
6,676 KB
testcase_12 AC 27 ms
6,676 KB
testcase_13 AC 22 ms
6,676 KB
testcase_14 AC 27 ms
6,676 KB
testcase_15 AC 26 ms
6,676 KB
testcase_16 AC 26 ms
6,676 KB
testcase_17 AC 58 ms
6,676 KB
testcase_18 AC 29 ms
6,676 KB
testcase_19 AC 51 ms
6,676 KB
testcase_20 AC 29 ms
6,676 KB
testcase_21 AC 36 ms
6,676 KB
testcase_22 AC 36 ms
6,676 KB
testcase_23 AC 54 ms
6,676 KB
testcase_24 AC 847 ms
6,676 KB
testcase_25 AC 836 ms
6,676 KB
testcase_26 AC 847 ms
6,676 KB
testcase_27 AC 593 ms
6,676 KB
testcase_28 AC 822 ms
6,676 KB
testcase_29 AC 849 ms
6,676 KB
testcase_30 AC 812 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using P = pair<int, int>;
using mint = modint998244353;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int main()
{
    int L, M, N;
    cin >> L >> M >> N;
	bitset<101010> A, B;
    rep(i, L){
        int a;
        cin >> a;
        A.set(a, 1);
    }
	rep(i, M){
        int b;
        cin >> b;
        B.set(b, 1);
    }       
    int Q;
	cin >> Q;
	rep(_, Q){
		cout << (A & B).count() << "\n";
		B <<= 1;
	}
	return 0;
}
0