Pagini recente » Cod sursa (job #2580448) | Cod sursa (job #2290449) | Cod sursa (job #738706) | Cod sursa (job #1526435) | Cod sursa (job #1326118)
#include<fstream>
#include<unordered_set>
using namespace std;
ifstream in("dtcsu.in");
ofstream out("dtcsu.out");
const int nmax = 13;
unordered_set<long long> s;
long long n, x;
int q, rasp;
long long zeros(long long a)
{
return (a ^ (a - 1)) & a;
}
int main(){
int player_unu=0;
for(int i = 0; i<nmax; i++)
{
in>>x;
if(x&1)
s.insert(x);
}
in>>q;
for(int shp = 0; shp<q; shp++)
{
in>>x;
if(x==0)
continue;
x /= zeros(x);
if(s.find(x)!=s.end())
rasp++;
}
out<<rasp<<'\n';
return player_unu;
}