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

LeetCode 5974. 分隔长廊的方案数 更多...

class  Solution
 

函数

 TEST (number_of_ways_to_divide_a_long_corridor, case1)
 
 TEST (number_of_ways_to_divide_a_long_corridor, case2)
 
 TEST (number_of_ways_to_divide_a_long_corridor, case3)
 
 TEST (number_of_ways_to_divide_a_long_corridor, case4)
 
 TEST (number_of_ways_to_divide_a_long_corridor, case6)
 

详细描述

LeetCode 5974. 分隔长廊的方案数

函数说明

◆ TEST() [1/5]

leetcode::number_of_ways_to_divide_a_long_corridor::TEST ( number_of_ways_to_divide_a_long_corridor  ,
case1   
)

在文件 leetcode_test.cpp929 行定义.

929 {
930 ASSERT_EQ(3, Solution::numberOfWays("SSPPSPS"));
931 }

引用了 leetcode::number_of_ways_to_divide_a_long_corridor::Solution::numberOfWays().

◆ TEST() [2/5]

leetcode::number_of_ways_to_divide_a_long_corridor::TEST ( number_of_ways_to_divide_a_long_corridor  ,
case2   
)

在文件 leetcode_test.cpp933 行定义.

933 {
934 ASSERT_EQ(1, Solution::numberOfWays("PPSPSP"));
935 }

引用了 leetcode::number_of_ways_to_divide_a_long_corridor::Solution::numberOfWays().

◆ TEST() [3/5]

leetcode::number_of_ways_to_divide_a_long_corridor::TEST ( number_of_ways_to_divide_a_long_corridor  ,
case3   
)

在文件 leetcode_test.cpp937 行定义.

937 {
938 ASSERT_EQ(0, Solution::numberOfWays("S"));
939 }

引用了 leetcode::number_of_ways_to_divide_a_long_corridor::Solution::numberOfWays().

◆ TEST() [4/5]

leetcode::number_of_ways_to_divide_a_long_corridor::TEST ( number_of_ways_to_divide_a_long_corridor  ,
case4   
)

在文件 leetcode_test.cpp941 行定义.

941 {
942 ASSERT_EQ(0, Solution::numberOfWays("P"));
943 }

引用了 leetcode::number_of_ways_to_divide_a_long_corridor::Solution::numberOfWays().

◆ TEST() [5/5]

leetcode::number_of_ways_to_divide_a_long_corridor::TEST ( number_of_ways_to_divide_a_long_corridor  ,
case6   
)

在文件 leetcode_test.cpp945 行定义.

945 {
946 ASSERT_EQ(1, Solution::numberOfWays("PSSSSP"));
947 }

引用了 leetcode::number_of_ways_to_divide_a_long_corridor::Solution::numberOfWays().