正文
增加 1 行删除 1 行
22 行未改动23242526272829303113 行未改动22 行未改动int n,a[MAXN],dp[MAXN],tot,pos=1;struct Node {int x,y;}st[MAXN];void insert(int x,int y) {while(tot>1&&_*(y-st[tot].y)*(st[tot].x-st[tot-1].x)<_*(st[tot].y-st[tot-1].y)*(x-st[tot].x)) tot--;return st[++tot]={x,y},void();}signed main() {ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);cin>>n;13 行未改动22 行未改动23242526272829303113 行未改动22 行未改动int n,a[MAXN],dp[MAXN],tot,pos=1;struct Node {int x,y;}st[MAXN];void insert(int x,int y) {while(tot>1&&_*(y-st[tot].y)*(st[tot].x-st[tot-1].x)<_*(st[tot].y-st[tot-1].y)*(x-st[tot].x)) tot--;return st[++tot]={x,y},void();}signed main() {ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);cin>>n;13 行未改动