摘要: lll 阅读全文
posted @ 2019-06-04 21:34 EM-LGH 阅读(68) 评论(0) 推荐(0) 编辑
摘要: escription 公交车一共经过N(1<=N<=20000)个站点,从站点1一直驶到站点N。K(1<=K<=50000)群奶牛希望搭乘这辆公交车。第i群牛一共有Mi(1<=Mi<=N)只. 他们希望从Si到Ei去。 公交车只能座C(1<=C<=100)只奶牛。而且不走重复路线,请计算这辆车最多能 阅读全文
posted @ 2019-06-04 18:35 EM-LGH 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Description 最近,Farmer John的奶牛们越来越不满于牛棚里一塌糊涂的电话服务 于是,她们要求FJ把那些老旧的电话线换成性能更好的新电话线。 新的电话线架设在已有的N(2 <= N <= 100,000)根电话线杆上, 第i根电话线杆的高度为height_i米(1 <= heigh 阅读全文
posted @ 2019-06-04 16:12 EM-LGH 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Description The cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk 阅读全文
posted @ 2019-06-04 11:30 EM-LGH 阅读(227) 评论(0) 推荐(0) 编辑
摘要: Description FJ's cows really hate getting wet so much that the mere thought of getting caught in the rain makes them shake in their hooves. They have 阅读全文
posted @ 2019-06-04 11:04 EM-LGH 阅读(133) 评论(0) 推荐(0) 编辑
摘要: Code: 阅读全文
posted @ 2019-06-04 09:54 EM-LGH 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 方法二:LCT+矩阵乘法 上文中,我们用线段树来维护重链上的各种矩阵转移. 第二种方法是将树链剖分替换为动态树. 我们知道,矩阵乘法 $\begin{bmatrix} F_{u,0} & F_{u,0}\\ F_{u,1} & -\infty \end{bmatrix}\times\begin{bm 阅读全文
posted @ 2019-06-04 08:00 EM-LGH 阅读(356) 评论(0) 推荐(0) 编辑