import java.util.Arrays; import java.util.Scanner; public class Main4 { public static void main(String[] args) { Main4 p = new Main4(); } public Main4() { Scanner sc = new Scanner(System.in); int n =sc.nextInt(); int[] w =new int[n]; for(int i=0;i=0;j--){ if(j-w[i] >= 0 && dp[j-w[i]]){ dp[j] = true; } } } int sum = 0; for(int i=0;i