#include #define rep(i,a,b) for(int i=a;i>n; for(int i=0; i>w[i]; t += w[i]; } tw = t/2; for(int i=0; i