版本比较
题解 【「JOISC 2017 Day 2」火车旅行】
正文
增加 1 行删除 1 行
46 行未改动4748495051515253545521 行未改动46 行未改动 top=0; st[++top]=n; for(register int i=n;i>=1;--i) { while(top&&a[st[top]]<a[i]) --top; g[i][0]=st[top]; st[++top]=i; st[++top]=i; } for(register int j=1;j<=20;++j) { for(register int i=1;i<=n;++i) { f[i][j]=min(f[f[i][j-1]][j-1],f[g[i][j-1]][j-1]);21 行未改动