Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through these links, eBlogarithm may earn a commission at no extra cost to you. Prices and availability are subject to change.
#include<stdio.h>
int v[1500010];
int main(){
int i,l,n,x;
long long int r;
scanf("%d%d",&n,&x);
for(i=0;i<n;i++)
{
scanf("%d",&l);
r=r+v[l^x];
v[l]++;
}
printf("%I64d",r);
return 0;
}
📦 Looking for Codeforces Round 383 Div Problem Arpa? Check the best deals on Amazon.
🛒 Shop Codeforces Round 383 Div Problem Arpa on Amazon
As an Amazon Associate, eBlogarithm earns from qualifying purchases. Prices and availability are subject to change.
Affiliate Disclosure: This post contains Amazon affiliate links. If you purchase through these links, eBlogarithm may earn a commission at no extra cost to you. Prices and availability are subject to change.
#include<stdio.h>
int v[1500010];
int main(){
int i,l,n,x;
long long int r;
scanf("%d%d",&n,&x);
for(i=0;i<n;i++)
{
scanf("%d",&l);
r=r+v[l^x];
v[l]++;
}
printf("%I64d",r);
return 0;
}
📦 Looking for Codeforces Round 383 Div Problem Arpa? Check the best deals on Amazon.
🛒 Shop Codeforces Round 383 Div Problem Arpa on Amazon
As an Amazon Associate, eBlogarithm earns from qualifying purchases. Prices and availability are subject to change.