Cod sursa(job #1220638)
| Utilizator | Data | 17 august 2014 22:55:13 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.51 kb |
# include <cstdio>
# include <unordered_set>
using namespace std;
unordered_set <long long> S;
int main(void)
{
freopen("dtcsu.in","r",stdin);
freopen("dtcsu.out","w",stdout);
long long x;
for (int i=1;i<=276997;++i)
{
scanf("%lld\n",&x);
if (x%2) S.insert(x);
}
int n;
scanf("%lld",&n);
int p=0;
while (n--)
{
scanf("%lld",&x);
p+=(x && S.find(x)!=S.end());
}
printf("%lld",p);
return 0;
}
