版本比较
扣血回血机制 n+m<=72
正文
增加 2 行删除 2 行
6 行未改动7891011121314151617105 行未改动全部展开6 行未改动#define ll long longconst int N=605;struct node{ll cst,val;};int cmp1(node x,node y){// 没有严谨单调性return max(x.cst,x.cst-x.val+y.cst)<max(y.cst,y.cst-y.val+x.cst);}int cmp2(node x,node y){if((x.cst<x.val)!=(y.cst<y.val)) return x.cst<x.val;if(x.cst<x.val) return x.cst<y.cst;return x.val>y.val;}105 行未改动全部展开6 行未改动7891011121314151617105 行未改动全部展开6 行未改动#define ll long longconst int N=605;struct node{ll cst,val;};int cmp1(node x,node y){// 没有严谨单调性return max(x.cst,x.cst-x.val+y.cst)<max(y.cst,y.cst-y.val+x.cst);}int cmp2(node x,node y){if((x.cst<x.val)!=(y.cst<y.val)) return x.cst<x.val;if(x.cst<x.val) return x.cst<y.cst;return x.val>y.val;}105 行未改动全部展开