結果

問題 No.206 数の積集合を求めるクエリ
ユーザー pekempeypekempey
提出日時 2016-04-01 18:02:16
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 1,136 ms / 7,000 ms
コード長 489 bytes
コンパイル時間 1,271 ms
コンパイル使用メモリ 160,024 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-10 07:08:39
合計ジャッジ時間 10,512 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 2 ms
6,944 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 1 ms
6,944 KB
testcase_06 AC 3 ms
6,940 KB
testcase_07 AC 3 ms
6,940 KB
testcase_08 AC 3 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 3 ms
6,940 KB
testcase_12 AC 36 ms
6,944 KB
testcase_13 AC 31 ms
6,940 KB
testcase_14 AC 35 ms
6,944 KB
testcase_15 AC 34 ms
6,940 KB
testcase_16 AC 33 ms
6,940 KB
testcase_17 AC 52 ms
6,940 KB
testcase_18 AC 27 ms
6,944 KB
testcase_19 AC 48 ms
6,940 KB
testcase_20 AC 27 ms
6,944 KB
testcase_21 AC 33 ms
6,940 KB
testcase_22 AC 32 ms
6,944 KB
testcase_23 AC 49 ms
6,944 KB
testcase_24 AC 1,136 ms
6,940 KB
testcase_25 AC 1,127 ms
6,940 KB
testcase_26 AC 1,109 ms
6,944 KB
testcase_27 AC 805 ms
6,944 KB
testcase_28 AC 1,094 ms
6,940 KB
testcase_29 AC 1,091 ms
6,944 KB
testcase_30 AC 1,078 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

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<101010> 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