pair的排序_贪心_什么时候结束循环_边界情况的考虑_1876_A. Helmets in Night Light
#includeusingnamespacestd;typedeflonglongLL;constintN=1e5+10;inta[N],b[N];voidsolve(){intn,p;cin>>n>>p;for(inti=0;i>a[i];for(inti=0;i>b[i];vector>segs(n);for(inti=0;i=n)break;}if(n>=ans)price+=(n-ans)