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

LeetCode 6029. Maximum Points in an Archery Competition 更多...

class  Solution
 

函数

 TEST (maximum_points_in_an_archery_competition, case1)
 
 TEST (maximum_points_in_an_archery_competition, case2)
 

详细描述

LeetCode 6029. Maximum Points in an Archery Competition

函数说明

◆ TEST() [1/2]

leetcode::maximum_points_in_an_archery_competition::TEST ( maximum_points_in_an_archery_competition  ,
case1   
)

在文件 leetcode_test.cpp2380 行定义.

2380 {
2381 vector aliceArrows = {1, 1, 0, 1, 0, 0, 2, 1, 0, 1, 2, 0};
2382 const vector output = {0, 0, 0, 0, 1, 1, 0, 0, 1, 2, 3, 1};
2383 ASSERT_EQ(output, Solution::maximumBobPoints(9, aliceArrows));
2384 }

引用了 leetcode::maximum_points_in_an_archery_competition::Solution::maximumBobPoints().

◆ TEST() [2/2]

leetcode::maximum_points_in_an_archery_competition::TEST ( maximum_points_in_an_archery_competition  ,
case2   
)

在文件 leetcode_test.cpp2386 行定义.

2386 {
2387 vector aliceArrows = {0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2};
2388 const vector output = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0};
2389 ASSERT_EQ(output, Solution::maximumBobPoints(3, aliceArrows));
2390 }

引用了 leetcode::maximum_points_in_an_archery_competition::Solution::maximumBobPoints().