#include int N,A[18],B[18]; bool C[1<<18][18]; bool chk(int x) { for (int j=1;j<(1<