#include #include #include #include #include #include #include using namespace std; typedef long long ll; int N; int X; int A[200000]; int lx, rx; int la[200000], ra[200000]; // v[i]: left halfがiのlaたち vector v[1<<9]; ll v_cnt[1<<9][1<<9]; ll cnt[1<<9][9]; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; cin >> N >> X; lx = (X>>9); rx = (X&((1<<9)-1)); for(int i = 0; i < N; i++) { cin >> A[i]; la[i] = (A[i]>>9); ra[i] = (A[i]&((1<<9)-1)); v[la[i]].push_back(ra[i]); v_cnt[la[i]][ra[i]]++; for(int j = 0; j < 9; j++){ if(ra[i] & (1<