742 B - Arpa’s obvious problem and Mehrdad’s terrible solution codeforces

来源:互联网 发布:免费教学软件下载 编辑:程序博客网 时间:2024/05/16 16:08
 #include<bits/stdc++.h> using namespace std; int num[1000005]; int main() {     int n,x,temp;     long long ans=0;     cin>>n>>x;     while(n--)     {         cin>>temp;         ans+=num[temp^x];         num[temp]++;     }     cout<<ans<<endl;     return 0; }

0 0
原创粉丝点击