#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; vector d(n); for(Int i=0;i>d[i]; Int s=1< cnt(s,0); for(Int b=0;b>i)&1) cnt[b]+=d[i]<0; vector dp(s,0); dp[0]=100; for(Int b=0;b>i)&1) continue; chmax(dp[b|(1<