Answer the question
In order to leave comments, you need to log in
How to solve the turtle problem?
I can’t figure out how to solve it, there are a few other examples on the Internet ...
There is a grid on which the turtle can move. You can only move along the black lines. The turtle needs to get from point A to point B. At each corner, it can only turn on T1 or only T2. The driving time for each street is indicated in the table. It is required to find the maximum time for which the turtle can get from point A to point B.
Make a calculation on paper using dynamic programming. Present the calculation process in the form of a table. For the second row from the top of the table, write out a detailed calculation.
If A is the upper left corner, B is the lower right corner. T1 - east, T2 - south.
Answer the question
In order to leave comments, you need to log in
dynamic programming methodThat is, the subtask is the passage of the intersection and its recursive execution starting from point A.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question