#include #include #include #include using namespace std; int main(){ int N;cin>>N; vector v1(N); int a=0; for(int i=0;i>v1[i]; if(a bs1(a); int p=0; for(int i=32;i>=0;--i){ if(bs1.test(i)){ p=i; break; } } bitset<33> bs2=bs1; int c=a; while(1){ c=(int)bs2.to_ulong(); p-=1; vector v2=v1; int b=0; for(int i=0;i=b || p<0){ break; } else { bs1.flip(p); bs2=bs1; } } int ans=0; for(int i=0;i