Cod sursa(job #1524981)
Utilizator | Data | 14 noiembrie 2015 16:57:39 | |
---|---|---|---|
Problema | Dtcsu | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.4 kb |
#include <fstream>
#include <unordered_set>
using namespace std;
ifstream f("dtcsu.in");
ofstream g("dtcsu.out");
unordered_set <long long> h;
int main()
{
int t=276997;
long long sol=0,n;
while(t--)
{
f>>n;
if(n&1LL) h.insert(n);
}
f>>t;
while(t--)
{
f>>n;
if(n&&h.find(n/(n&(-n)))!=h.end()) sol++;
}
g<<sol;
}