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

LeetCode 5227. K 次操作后最大化顶端元素 更多...

class  Solution
 

函数

 TEST (maximize_the_topmost_element_after_k_moves, case1)
 
 TEST (maximize_the_topmost_element_after_k_moves, case2)
 

详细描述

LeetCode 5227. K 次操作后最大化顶端元素

函数说明

◆ TEST() [1/2]

leetcode::maximize_the_topmost_element_after_k_moves::TEST ( maximize_the_topmost_element_after_k_moves  ,
case1   
)

在文件 leetcode_test.cpp2206 行定义.

2206 {
2207 vector nums = {5, 2, 2, 4, 0, 6};
2208 ASSERT_EQ(5, Solution::maximumTop(nums, 4));
2209 }

引用了 leetcode::maximize_the_topmost_element_after_k_moves::Solution::maximumTop().

◆ TEST() [2/2]

leetcode::maximize_the_topmost_element_after_k_moves::TEST ( maximize_the_topmost_element_after_k_moves  ,
case2   
)

在文件 leetcode_test.cpp2211 行定义.

2211 {
2212 vector nums = {2};
2213 ASSERT_EQ(-1, Solution::maximumTop(nums, 1));
2214 }

引用了 leetcode::maximize_the_topmost_element_after_k_moves::Solution::maximumTop().