Cod sursa(job #1050066)
| Utilizator | Data | 8 decembrie 2013 02:39:35 | |
|---|---|---|---|
| Problema | Dtcsu | Scor | 100 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.6 kb |
#include<cstdio>
#include<unordered_set>
using namespace std;
unordered_set<long long> h;
int n = 276997;
long long ans;
int main() {
freopen("dtcsu.in", "r", stdin);
freopen("dtcsu.out", "w", stdout);
long long val;
while(n--) {
scanf("%lld",&val);
if(val % 2 == 1)
h.insert(val);
}
scanf("%d",&n);
while(n--) {
scanf("%lld",&val);
if(val == 0)
continue;
val /= (val & -val);
if(h.find(val) != h.end())
++ans;
}
printf("%lld\n",ans);
return 0;
}
