Skip to content

Commit

Permalink
Update Readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wisdompeak authored Jun 8, 2019
1 parent 603679e commit 85cd37c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Recursion/808.Soup-Servings/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
```cpp
double DFS(int A,int B)
{
if (A<=0 && B>0) return 1;
if (A<=0 && B<=0) return 0.5;
if (A>0 && B<=0) return 0;
if (A<=0 && B>0) return 1; // 边界条件:A先倒完
if (A<=0 && B<=0) return 0.5; // 边界条件:AB同时倒完
if (A>0 && B<=0) return 0; // 边界条件:B先倒完
return 0.25*(DFS(A-100,B)+DFS(A-75,B-25)+DFS(A-50,B-50)+DFS(A-25,B-75));
}
```
Expand Down

0 comments on commit 85cd37c

Please sign in to comment.