# yukicoder No.698 ペアでチームを作ろう # 解答閲覧 def main(): N = int(input()) A = list(map(int, input().split())) dp = [0]*(2**N+10) for n in range(1<