struct Basis {std::vector<ll>b;int size = 0;Basis(int n) {size = n;b.assign(size, 0);}void add(ll x) {for (int i = size - 1; i >= 0; i--) {if (x >> i & 1) {if (b[i] == 0) {b[i] = x;return;}else {x ^= b[i];}}}}
};
题目https://codeforces.com/gym/105336/attachmentsJ题
【模板】线性基 - 洛谷
