Mai intai trebuie sa te autentifici.
Cod sursa(job #1868466)
Utilizator | Data | 4 februarie 2017 22:52:37 | |
---|---|---|---|
Problema | Dtcsu | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.61 kb |
#include <unordered_set>
#include <iostream>
#include <fstream>
using namespace std;
ifstream in("dtcsu.in");
ofstream out("dtcsu.out");
const int numnr = 276997;
unordered_set <long long> gasit;
int main()
{
for(int i = 1; i <= numnr; i++)
{
long long x;
in >> x;
if(x % 2 == 1)
gasit.insert(x);
}
int q;
in >> q;
int nr = 0;
for(int i = 1; i <= q; i++)
{
long long x;
in >> x;
x = x / (x & (-x));
if(gasit.find(x) == gasit.end())
nr++;
}
out << nr << "\n";
return 0;
}