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 12:30
Which expression is the factored from of 2/3x + 4?asap
Answers: 1
question
Mathematics, 21.06.2019 21:00
Graph the system of inequalities presented here on your own paper, then use your graph to answer the following questions: y < 4x − 8 y is greater than or equal to negative 5 over 2 times x plus 5 part a: describe the graph of the system, including shading and the types of lines graphed. provide a description of the solution area. (6 points) part b: is the point (5, −8) included in the solution area for the system? justify your answer mathematically. (4 points)
Answers: 3
question
Mathematics, 21.06.2019 23:40
Put the following steps for calculating net worth in the correct order
Answers: 1
question
Mathematics, 22.06.2019 00:00
As a salesperson you get $50/day and $3.60/each sales you make.if you want to make $60 in one day, how many sales would you need need to make ? a 3b 4c 5d 6 show work.
Answers: 1
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
Mathematics, 06.05.2020 04:31
question
Chemistry, 06.05.2020 04:31
Questions on the website: 13722363