Ocean Currents_水蛙菌-CSDN博客
版权 For a boat on a large body of water, strong currents can be dangerous, but with careful planning, theycan be harnessed to help the boat reach its destination. Your job is to help in that planning. At each location, the current flows in some direction. The captain can choose to either go with theflow of the current, using no energy, or to move one square in any other direction, at the cost of oneenergy unit. The boat always moves in one of the following eight directions: north, south, east, west,northeast, northwest, southeast, southwest. The boat cannot leave the boundary of the lake.