#include using namespace std; bool dp[110][10010]; int main(){ int N;cin>>N; int sum = 0; vector W(N); for(int i=0;i>W[i],sum += W[i]; dp[0][0] = true; for(int i=1;i<=N;++i){ for(int j=0;j<=sum;++j){ if(j-W[i-1] < 0) continue; if(dp[i-1][j-W[i-1]]) dp[i][j] = true; if(dp[i-1][j]) dp[i][j] = true; } } bool ans = false; for(int i=0;i