結果
| 問題 | 
                            No.206 数の積集合を求めるクエリ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             158b
                         | 
                    
| 提出日時 | 2015-06-09 23:41:07 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 859 bytes | 
| コンパイル時間 | 577 ms | 
| コンパイル使用メモリ | 74,076 KB | 
| 実行使用メモリ | 10,752 KB | 
| 最終ジャッジ日時 | 2024-07-06 15:16:42 | 
| 合計ジャッジ時間 | 9,630 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 21 TLE * 1 -- * 6 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <climits>
#include <vector>
#include <numeric>
#include <complex>
#include <map>
using namespace std;
//#define __int64 long long
#define long __int64
#define REP(i,a,b) for(int i=a;i<b;i++)
#define rep(i,n) REP(i,0,n)
const int Vecy[4] = {0,-1,0,1};
const int Vecx[4] = {1,0,-1,0};
//とりあえず普通に...
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
	
	int a_len,b_len,n,q;
	bool a[200000] = {false};
	int b[100000];
	int in;
	int ans;
	
	cin >> a_len >> b_len >> n;
	for(int i=0; i<a_len; i++){
		cin >> in;
		a[in-1] = true;
	}
	for(int i=0; i<b_len; i++){
		cin >> b[i];
	}
	cin >> q;
	
	for(int i=0; i<q; i++){
		ans = 0;
		for(int ib=0; ib<b_len; ib++){
			ans += a[ b[ib] - 1 + i];
		}
		
		cout << ans << endl;
	}
	
    
    return 0;
}
            
            
            
        
            
158b