Cod sursa(job #1194418)
| Utilizator | Data | 3 iunie 2014 20:42:41 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.52 kb |
#include <cstdio>
#include <unordered_set>
using namespace std;
int NUM=276997;
unordered_set <long long> hashin;
int main()
{
long long x;
freopen("dtcsu.in","r",stdin);
freopen("dtcsu.out","w",stdout);
while(NUM--){
scanf("%lld",&x);
if(x&1)hashin.insert(x);
}
int que;
scanf("%d",&que);
while(que--){
scanf("%lld",&x);
if(x&(-x))x/=x&(-x);
if(x and hashin.find(x)!=hashin.end())++NUM;
}
printf("%d\n",++NUM);
return 0;
}
