problemscpp
A collection of my answers to algorithm problems in c++.
| 函数
leetcode::knight_probability_in_chessboard 命名空间参考

LeetCode 688. Knight Probability in Chessboard 更多...

class  Solution
 
struct  status
 
struct  status_equal
 
struct  status_hash
 

函数

 TEST (knight_probability_in_chessboard, case1)
 
 TEST (knight_probability_in_chessboard, case2)
 

详细描述

LeetCode 688. Knight Probability in Chessboard

函数说明

◆ TEST() [1/2]

leetcode::knight_probability_in_chessboard::TEST ( knight_probability_in_chessboard  ,
case1   
)

在文件 leetcode_test.cpp1581 行定义.

1581 {
1582 auto sol = Solution();
1583 ASSERT_EQ(0.06250, sol.knightProbability(3, 2, 0, 0));
1584 }

◆ TEST() [2/2]

leetcode::knight_probability_in_chessboard::TEST ( knight_probability_in_chessboard  ,
case2   
)

在文件 leetcode_test.cpp1586 行定义.

1586 {
1587 auto sol = Solution();
1588 ASSERT_EQ(1.00000, sol.knightProbability(1, 0, 0, 0));
1589 }