/** * @FileName a.cpp * @Author kanpurin * @Created 2020.05.22 16:45:43 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int bitpopcount(ll n) { int res = 0; while (n) { if (n & 1) res++; n >>= 1; } return res; } int main() { int n;cin >> n; vector a(n); vector dp(1<> a[i]; if (a[i] < 0) { s |= (1 << i); } } dp[0] = 100; for (int i = 0; i < (1< 0) { dp[i | (1 << j)] = max(dp[i | (1 << j)],dp[i] + a[j]); } } else { dp[i | (1 << j)] = max(dp[i | (1 << j)],min(dp[i] + a[j],bitpopcount(i&s) * 100 + 100)); } } } } cout << dp[(1<