Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- int INF=2147483647;
- int inf=-2147483648;
- int mod=1000000007;
- #define read(x) cin >> x;
- #define fo(i,n) for(i=0;i<n;i++)
- #define one(x) cout<<(x)<<endl;
- #define two(a,b) cout<<(a)<<" "<<(b)<<endl;
- #define three(a,b,c) cout<<(a)<<" "<<(b)<<" "<<(c)<<endl;
- #define four(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl;
- #define write(a,i) cout << a[i] << " ";
- int main()
- {
- int n,x,uk=0,i,k;
- cin >> n >> x;int a[n];
- for (i=0;i<n;i++)
- {
- cin >> a[i];
- for (k=0;k<i;k++)
- //if ((a[i]^a[k]==x) && (sos[i]!=1) && (sos[k]!=1)) { sos[i]=1;sos[k]=1;uk++; }
- //cout << a[i] << " " << a[k] << " " << (a[i]^a[k]) << endl;
- if ((a[i]^a[k])==x) uk++;
- }
- cout << uk;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement