vector basis; void insert(ll x) { for(auto i:basis) x = min(x, x ^ basis[i]); if (x != 0) basis.push_back(x); }