#include #include using namespace std; class range {private: struct I{int x;int operator*(){return x;}bool operator!=(I& lhs){return x dp(33333, false); dp[0] = true; vector a(n); for(int i : range(n)) { scanf("%d", &a[i]); } for(int i : range(n)) { for(int j : range(33333)) { if(dp[j]) { dp[a[i] ^ j] = true; } } } int res = 0; for(int i : range(33333)) { if(dp[i]) { res++; } } printf("%d\n", res); return 0; }