import sys readline = sys.stdin.readline from collections import Counter def popcount(i): assert 0 <= i < 0x100000000 i = i - ((i >> 1) & 0x55555555) i = (i & 0x33333333) + ((i >> 2) & 0x33333333) return (((i + (i >> 4) & 0xF0F0F0F) * 0x1010101) & 0xffffffff) >> 24 INF = 10**18 N = int(readline()) A = [list(map(int, readline().split())) for _ in range(N)] dp = Counter() dp[0] = -INF for i in range(N): dpnew = Counter() for k, v in dp.items(): if popcount(k) != N//2: dpnew[k|(1<