Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #define repn(i, x, y) for(int i=x; i<=y; i++)
- #define rep(i, x, y) for(int i=x; i<y; i++)
- using namespace std;
- int n, x, k;
- int a[100005], b[100005];
- int main(){
- cin >> n >> x;
- int ans = 0;
- repn(i, 1, n) {
- cin >> a[i];
- ans += b[a[i]];
- //cout << (a[i] ^ x) << endl;
- b[a[i] ^ x]++;
- }
- cout << ans << endl;
- return 0;
- }
- //test for hack
- //20 100000
- //31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071 31071
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement