int n,a[18],b[18],c,d,e,o; int f(int i,int u){ if(!u)return 1; rep(j,n)if(u&1<>1; o=0; rep(i,n)o=o||f(i,(1<