[ICPC2018 Qingdao R] Plants vs. Zombies
传送门
题面翻译
给定 n n n 个植物和 m m m 的步数限制,每个植物在位置 1 … n 1\dots n 1…n 上。你初始时在位置 0 0 0,每次可以移动到相邻的位置上。
每次设你走完一步后到达的位置是 i i i,则会使得这个位置的植物的高度增加 a i a_i ai。设 d i d_i di 为走完 m m m 步后位置 i i i 的植物高度,求出一个最优的走法使得 min 1 ≤ i ≤ n d i \min\limits_{1 \le i \le n} d_i 1≤i≤nmindi 最大。
2 ≤ n ≤ 1 0 5 2\leq n\leq 10 ^ 5 2≤n≤105, 0 ≤ m ≤ 1 0 12 0\leq m\leq 10 ^ {12} 0≤m≤1012, 1 ≤ a i ≤ 1 0 5 1\leq a_i\leq 10 ^ 5 1≤ai≤105, ∑ n ≤ 1 0 6 \sum n\leq 10 ^ 6 ∑n≤106。
题目描述
BaoBao and DreamGrid are playing the game Plants vs. Zombies \textit{Plants vs. Zombies} Plants vs. Zombies. In the game, DreamGrid grows plants to defend his garden against BaoBao’s zombies.

Plants vs. Zombies(?) (Image from pixiv. ID: 21790160; Artist: socha) \textit{Plants vs. Zombies(?)} \\ \textit{(Image from pixiv. ID: 21790160; Artist: socha)} Plants vs. Zombies(?)(Image from pixiv. ID: 21790160; Artist: socha)
There are n n n plants in DreamGrid’s garden arranged in a line. From west to east, the plants are numbered from 1 to n n n and the i i i-th plant lies i i

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



