摘要:
裸的斜率优化,去年的APIO怎么有此等水题。//By YY_More#include<cstdio>struct point{ long long x,y;} now,D[1000010]; long long sum[1000010]; int L,R,n,a,b,c;inline long long xmul(point p,point q,point s){ return (q.x-p.x)*(s.y-p.y)-(q.y-p.y)*(s.x-p.x);} int main(){ scanf("%d",&n); scanf("%d%d%d& 阅读全文