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

LeetCode 6007. 数组的最大与和 更多...

class  Solution
 

函数

 TEST (maximum_and_sum_of_array, case1)
 
 TEST (maximum_and_sum_of_array, case2)
 

详细描述

LeetCode 6007. 数组的最大与和

函数说明

◆ TEST() [1/2]

leetcode::maximum_and_sum_of_array::TEST ( maximum_and_sum_of_array  ,
case1   
)

在文件 leetcode_test.cpp1508 行定义.

1508 {
1509 vector input = {1, 2, 3, 4, 5, 6};
1510 ASSERT_EQ(9, Solution::maximumANDSum(input, 3));
1511 }

引用了 leetcode::maximum_and_sum_of_array::Solution::maximumANDSum().

◆ TEST() [2/2]

leetcode::maximum_and_sum_of_array::TEST ( maximum_and_sum_of_array  ,
case2   
)

在文件 leetcode_test.cpp1513 行定义.

1513 {
1514 vector input = {1, 3, 10, 4, 7, 1};
1515 ASSERT_EQ(24, Solution::maximumANDSum(input, 9));
1516 }

引用了 leetcode::maximum_and_sum_of_array::Solution::maximumANDSum().