#include //#include //using namespace atcoder; using namespace std; using ll = long long; int main(){ int n; cin >> n; vector a(n); vector> b(n,vector(n)); for(auto &i:a)cin >> i; for(auto &i:b)for(auto &j:i)cin >> j; vector ansvec = {0}; ll ans = a[0]; for(int bit=0;bit<(1< st; for(int j = 0;j>j&1){ st.insert(j); now += a[j]; } } vector st2; for(auto &i:st)st2.push_back(i); for(int i = 0;ians){ ans = now; ansvec = st2; } } cout<