Cod sursa(job #2911665)

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