結果
| 問題 |
No.206 数の積集合を求めるクエリ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-06-08 09:52:23 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 920 ms / 7,000 ms |
| コード長 | 461 bytes |
| コンパイル時間 | 1,933 ms |
| コンパイル使用メモリ | 195,696 KB |
| 最終ジャッジ日時 | 2025-01-22 04:52:25 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
bitset <100000> a, b;
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
int L, M, N, Q, t;
cin >> L >> M >> N;
for (int i = 0; i < L; i++)
{
cin >> t;
t -= 1;
a.set(t, true);
}
for (int i = 0; i < M; i++)
{
cin >> t;
t -= 1;
b.set(t, true);
}
cin >> Q;
for (int i = 0; i < Q; i++)
{
bitset <100000> temp = a & b;
cout << temp.count() << '\n';
b <<= 1;
}
return 0;
}