Pagini recente » Cod sursa (job #537785) | Cod sursa (job #675886) | Cod sursa (job #494333) | Cod sursa (job #1632703) | Cod sursa (job #3177458)
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ifstream fin("dtcsu.in");
ofstream fout("dtcsu.out");
#define HASH_BASE 73
#define HASH_SIZE 1000007
int computehash(int x)
{
int strhash=0;
while(x)
{
strhash = (strhash * HASH_BASE + x%10)%HASH_SIZE;
x/=10;
}
return strhash;
}
unordered_set<ll> S;
int main()
{
for(int i=1;i<=276997;i++)
{
ll x;
fin >> x;
S.insert(x);
}
int q;
fin >> q;
int cnt=0;
while(q--)
{
int x;
fin >> x;
cnt += S.count(x);
}
fout << cnt;
}