#include using namespace std; using ll = long long; int main(){ int n; cin>>n; vector a(n); for(int i = 0;i>a[i]; vector dp(1<>j&1) { for(int k = j + 1;k>k&1) { dp[i|1<