Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- const int N = 1e5 + 5;
- int a[N];
- int cnt[N];
- int main()
- {
- #if AT_LVLS9_PC
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- #endif
- ios::sync_with_stdio(false);
- int n, x;
- cin >> n >> x;
- long long ans = 0;
- for (int i = 0; i < n; i++)
- {
- cin >> a[i];
- cnt[a[i]]++;
- ans += cnt[a[i] ^ x];
- }
- cout << ans << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement