#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define BET(a,b,c) ((a)<=(b)&&(b)<(c)) #define FOR(i,n) for(int i=0,i##_end=(int(n));i VI; typedef vector VVI; typedef vector > matrix; int rank2(matrix A) { const int n = A.size(), m = A[0].size(); int r = 0; for (int i = 0; r < n && i < m; ++i) { int pivot = r; for (int j = r+1; j < n; ++j) if (abs(A[j][i]) > abs(A[pivot][i])) pivot = j; swap(A[pivot], A[r]); if (abs(A[r][i]) <= 0) continue; for (int k = m-1; k >= i; --k) A[r][k] /= A[r][i]; for(int j = r+1; j < n; ++j) for(int k = i; k < m; ++k){ A[j][k] -= A[r][k] * A[j][i]; if(A[j][k] % 2 != 0) A[j][k] = 1; } ++r; } return r; } int main() { int n; cin>>n; VI A(n); vector > mat(n, vector(64)); FOR(i,n){ scanf("%d",&A[i]); FOR(j,61) if(A[i] & (1LL<