/* -*- coding: utf-8 -*- * * 184.cc: No.184 たのしい排他的論理和(HARD) - yukicoder */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; /* constant */ const int MAX_N = 100000; /* typedef */ typedef long long ll; /* global variables */ ll as[MAX_N]; /* subroutines */ /* main */ int main() { int n; cin >> n; for (int i = 0; i < n; i++) cin >> as[i]; int cnt = 0; for (int i = 0; i < n; i++) if (as[i] != 0) { cnt++; ll bi = 1LL << 60; while (bi > as[i]) bi >>= 1; for (int j = i + 1; j < n; j++) if ((as[j] & bi) != 0) as[j] ^= as[i]; } printf("%lld\n", 1LL << cnt); return 0; }