Cod sursa(job #1195040)
Utilizator | Andrei Barbuta AndreiBarbuta | Data | 5 iunie 2014 22:07:22 |
---|---|---|---|
Problema | Dtcsu | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.5 kb |
#include <cstdio>
#include <unordered_set>
using namespace std;
unordered_set<long long int>h;
int main()
{
freopen("dtcsu.in","r",stdin);
freopen("dtcsu.out","w",stdout);
long long int x,cnt=0,n;
for(register int i=1;i<=276997;i++){
scanf("%lld",&x);
if(x&1)h.insert(x);
}
scanf("%d",&n);
for(register int i=1;i<=n;i++){
if(x&1)x/=x&(-x);
if(x and h.find(x)!=h.end())cnt++;
}
printf("%lld",cnt);
return 0;
}