subject
Mathematics, 09.04.2021 02:00 kimmy6973

Smoov and Curly are playing a game. In this game, there is a stack of n bricks. The ith brick in the stack is worth v[i] points (where v[0] is the value of the top brick). The players take turns removing either 1 or 2 bricks from the top of the stack. The player that removes a brick earns the number of points associated with the brick. The game ends when all the bricks have been removed, and the winner is the player who has earned the most points. For example, if v = [1, 1, 3, 4] and Smoov is the first player to move, then Smoov's optimal strategy is to take just the first brick (earning 1 point). Curly's optimal strategy is then to take the next two bricks (earning 4 points). Smoov then finishes by taking the last brick (earning 4 more points). Therefore, the maximum score Smoov can earn is 5. Assume that Smoov takes the first turn and that both Smoov and Curly play optimally. Given the list v of the values of the bricks (all integers greaterthanorequalto 0), output the maximum score Smoov can earn.

Required:
a. Define the subproblems to be solved in English.
b. Define an appropriate recurrence for the subproblems.

ansver
Answers: 2

Another question on Mathematics

question
Mathematics, 21.06.2019 13:00
Determine whether the angles in each given pair are coterminal. 744°, -336°
Answers: 1
question
Mathematics, 21.06.2019 18:00
Last year, a state university received 3,560 applications from boys. of those applications, 35 percent were from boys who lived in other states. part a)how many applications did the university receive from boys who lived in other states? part b)applications to the university from boys represented 40percent of all applications. how many applications did the university receive in all? i don't how to do part b so me and plz tell how you got your answer
Answers: 1
question
Mathematics, 21.06.2019 19:30
Complete the solution of the equation. find the value of y when x equals to 1 9x-5y=29
Answers: 2
question
Mathematics, 21.06.2019 19:30
Consider a cube that has sides of length l. now consider putting the largest sphere you can inside this cube without any point on the sphere lying outside of the cube. the volume ratio -volume of the sphere/ volume of the cube is 1. 5.2 × 10−1 2. 3.8 × 10−1 3. 1.9 4. 2.5 × 10−1 5. 3.8
Answers: 2
You know the right answer?
Smoov and Curly are playing a game. In this game, there is a stack of n bricks. The ith brick in the...
Questions
question
Social Studies, 22.02.2021 15:00
question
History, 22.02.2021 15:00
question
Chemistry, 22.02.2021 15:10
Questions on the website: 13722367