这个算法游戏怎么才能用最高效的方法解决啊?# Computation - 科学计算
n*t
1 楼
You are at square [0, 0] of an n*n grid. There is $1,000,000 on square [n - 1
, n - 1]. Your goal is to reach that square and take the money. You can
traverse the grid only by going to the square to the right, left, up or down.
Unfortunately some squares have killer monsters. Entering any of these squares
means a slow and painful death. There are no killer monsters on [0, 0] and [n
- 1, n - 1]. Other squares have greedy dragons. To enter any of these squares
you must pay a $1000. You have borro
, n - 1]. Your goal is to reach that square and take the money. You can
traverse the grid only by going to the square to the right, left, up or down.
Unfortunately some squares have killer monsters. Entering any of these squares
means a slow and painful death. There are no killer monsters on [0, 0] and [n
- 1, n - 1]. Other squares have greedy dragons. To enter any of these squares
you must pay a $1000. You have borro