Cod sursa(job #1194417)

Utilizator xtreme77Patrick Sava xtreme77 Data 3 iunie 2014 20:35:44
Problema Dtcsu Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.5 kb
#include <cstdio>
#include <unordered_set>
using namespace std;
int NUM=276997;
unordered_set <long long> hashin;
int main()
{
    long long x;
    freopen("dtcsu.in","r",stdin);
    freopen("dtcsu.out","w",stdout);
    while(NUM--){
        scanf("%lld",&x);
        if(x&1)hashin.insert(x);
    }
    int que;
    scanf("%d",&que);
    while(que--){
        scanf("%lld",&x);
        if(x and hashin.find((x/x&(-x)))!=hashin.end())++NUM;
    }
    printf("%d\n",NUM);
    return 0;
}