Caisasolvedtheproblemwiththesugarandnowheisonthewaybacktohome. Caisaisplayingamobilegameduringhispath. Thereare (n ?? 1) pylonsnumberedfrom0toninthisgame. Thepylonwithnumber0haszeroheight, thepylon
Caisa solved the problem with the sugar and now he is on the way back to home. Caisa is playing a mobile game during his path. There are (n ?? 1) pylons numbered from 0 to n in this game. The pylon with number 0 has zero height, the pylon
Caisa solved the problem with the sugar and now he is on the way back to home.
Caisa is playing a mobile game during his path. There are (N? +? 1) pylons numbered from 0NIn this game. The pylon with number 0has zero height, the pylon with numberI(I?>? 0) has heightHI. The goal of the game is to reachN-Th pylon, and the only move the player can do is to jump from the current pylon (let's denote its numberK) To the next one (its number will beK? +? 1). When the player have made such a move, its energy increasesHK? -?HK? +? 1 (if this value is negative the player loses energy). The player must have non-negative amount of energy at any moment of the time.
Initially Caisa stand at 0 pylon and has 0 energy. the game provides a special opportunity: one can pay a single dollar and increase the height of anyone pylon by one. caisa may use that opportunity several times, but he doesn't want to spend too much money. what is the minimal amount of money he must paid to reach the goal of the game?