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

LeetCode 2100. Find Good Days to Rob the Bank 更多...

class  Solution
 

函数

 TEST (find_good_days_to_rob_the_bank, case1)
 
 TEST (find_good_days_to_rob_the_bank, case2)
 
 TEST (find_good_days_to_rob_the_bank, case3)
 
 TEST (find_good_days_to_rob_the_bank, case4)
 

详细描述

LeetCode 2100. Find Good Days to Rob the Bank

函数说明

◆ TEST() [1/4]

leetcode::find_good_days_to_rob_the_bank::TEST ( find_good_days_to_rob_the_bank  ,
case1   
)

在文件 leetcode_test.cpp2085 行定义.

2085 {
2086 vector input = {5, 3, 3, 3, 5, 6, 2};
2087 const vector output = {2, 3};
2088 ASSERT_EQ(output, Solution::goodDaysToRobBank(input, 2));
2089 }

引用了 leetcode::find_good_days_to_rob_the_bank::Solution::goodDaysToRobBank().

◆ TEST() [2/4]

leetcode::find_good_days_to_rob_the_bank::TEST ( find_good_days_to_rob_the_bank  ,
case2   
)

在文件 leetcode_test.cpp2091 行定义.

2091 {
2092 vector input = {1, 1, 1, 1, 1};
2093 const vector output = {0, 1, 2, 3, 4};
2094 ASSERT_EQ(output, Solution::goodDaysToRobBank(input, 0));
2095 }

引用了 leetcode::find_good_days_to_rob_the_bank::Solution::goodDaysToRobBank().

◆ TEST() [3/4]

leetcode::find_good_days_to_rob_the_bank::TEST ( find_good_days_to_rob_the_bank  ,
case3   
)

在文件 leetcode_test.cpp2097 行定义.

2097 {
2098 vector input = {1, 2, 3, 4, 5, 6};
2099 const vector<int> output = {};
2100 ASSERT_EQ(output, Solution::goodDaysToRobBank(input, 2));
2101 }

引用了 leetcode::find_good_days_to_rob_the_bank::Solution::goodDaysToRobBank().

◆ TEST() [4/4]

leetcode::find_good_days_to_rob_the_bank::TEST ( find_good_days_to_rob_the_bank  ,
case4   
)

在文件 leetcode_test.cpp2103 行定义.

2103 {
2104 vector input = {4, 3, 2, 1};
2105 const vector<int> output = {};
2106 ASSERT_EQ(output, Solution::goodDaysToRobBank(input, 1));
2107 }

引用了 leetcode::find_good_days_to_rob_the_bank::Solution::goodDaysToRobBank().