Codeforces Round #383 (Div. 2), problem: (B) Arpa’s obvious problem and Mehrdad’s terrible solution , Solution in C/C++

By |2017-04-07T22:11:48+06:00December 17th, 2016|Categories: C/C++, Programming|Tags: , , , , , , , |

#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; }