#include #include #include using namespace std; using ll = long long; int main(void){ int n; cin >> n; vector a(n, vector(n)); for(auto&x:a)for(auto&y:x) cin >> y; int ans=0; auto dfs=[&](auto dfs, int c, int mask, int now){ if(c==n){ ans=max(ans, now); return; } for(int i=0; i>i&1)){ int nm=mask|(1<>j&1)){ dfs(dfs, c+2, (nm|(1<