请不要像我一样这么写:
struct node{ vector<no> s;int w,id; }q[N]; …… sort(q+1,q+1+tot);
要知道这样排序,每次移动vector是极其耗费时间的