【CF675E】Trains and Statistic(贪心,DP,线段树优化)
摘要:
题意:a[i]表示从第i个车站可以一张票到第[i+1,a[i]]这些车站;p[i][j]表示从第i个车站到第j个车站的最少的票数,现在要求∑dp[i][j](1tree[p].s then tree[p]:=tree[ptree[p].s then tree[p]:=tree[p>1; 27 build(l,mid,p>1; 40 t:=0; 41 if (x>=l)and(yt then ... 阅读全文
posted @ 2016-11-06 21:17 myx12345 阅读(341) 评论(0) 推荐(0) 编辑