#include #include #include using namespace std; #define RREP(i,s,e) for (i = s; i >= e; i--) #define rrep(i,n) RREP(i,n,0) #define REP(i,s,e) for (i = s; i < e; i++) #define rep(i,n) REP(i,0,n) #define INF 100000000 typedef long long ll; int dp[1<<15]; int m[15]; int n; int solve(int x) { int i, j; if (dp[x] >= 0) return dp[x]; rep (i,n) { if (x & 1<> n; rep (i,n) cin >> m[i]; fill(dp+1,dp+(1<