#include #include using namespace std; constexpr int inf = 987'654'321; int main(void) { int N; scanf("%d", &N); vector a(N), b(N); for(int i=0; i> dp(N, vector(1<> u & 1)) { continue; } if(dp[u][mask] == inf) { continue; } for(int v=0; v> v & 1) { continue; } int nmask = mask | (1<