Skip to content

Commit

Permalink
Create Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdompeak authored Aug 24, 2020
1 parent 2cb45c8 commit c279501
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Recursion/1510.Stone-Game-IV/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### 1510.Stone-Game-IV

很显然的决策问题。假设dp[n]表示我方手头数字是n时能否胜利。那么遍历自己的决策(减去某个平方数),将剩下的数字(假设是m)转移给对手。一旦对手处理的数字m最终得到的结果是失败,那么说明我方肯定能赢。如果无论什么m,对手都能处理成功,那么说明我方肯定输。

本题的递归和DP写法都很好写。

0 comments on commit c279501

Please sign in to comment.