Plants vs. Zombies(2018ICPC青岛站E题) 二分
Plants vs. Zombies ZOJ - 4062 BaoBao and DreamGrid are playing the game Plants vs. Zombies . In the game, DreamGrid grows plants to defend his garden against BaoBao's zombies There are plants in DreamGrid's garden arranged in a line. From west to east, the plants are numbered from 1 to and the -th plant lies meters to the east of DreamGrid's house. The -th plant has a defense value of and a growth speed of . Initially, for all . DreamGrid uses a robot to water the plants. The robot is in his house initially. In one step of watering, DreamGrid will