Cod sursa(job #2911667)

Utilizator BlaugranasEnal Gemaledin Blaugranas Data 1 iulie 2022 06:41:40
Problema Dtcsu Scor 80
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.39 kb
#include<bits/stdc++.h>
using namespace std;
ifstream F("dtcsu.in");
ofstream G("dtcsu.out");
int t,y;
long long x;
unordered_set<long long> v;
int main()
{
    for(t=276997;t;--t) {
        F>>x;
        if(x&1LL)
            v.insert(x);
    }
    for(F>>t;t;--t) {
        for(F>>x;x&&(x&1)==0;x>>=1);
        if(x&&v.find(x)!=v.end())
            ++y;
    }
    return G<<y,0;
}