Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
For each question, we can either solve it or skip it. How can we use Dynamic Programming to decide the most optimal option for each problem?
We store for each question the maximum points we can earn if we started the exam on that question.
If we skip a question, then the answer for it will be the same as the answer for the next question.
If we solve a question, then the answer for it will be the points of the current question plus the answer for the next solvable question.
The maximum of these two values will be the answer to the current question.