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

LeetCode 1380. Lucky Numbers in a Matrix 更多...

class  Solution
 

函数

 TEST (lucky_numbers_in_a_matrix, case1)
 
 TEST (lucky_numbers_in_a_matrix, case2)
 
 TEST (lucky_numbers_in_a_matrix, case3)
 

详细描述

LeetCode 1380. Lucky Numbers in a Matrix

函数说明

◆ TEST() [1/3]

leetcode::lucky_numbers_in_a_matrix::TEST ( lucky_numbers_in_a_matrix  ,
case1   
)

在文件 leetcode_test.cpp1532 行定义.

1532 {
1533 vector<vector<int>> input = {{3, 7, 8}, {9, 11, 13}, {15, 16, 17}};
1534 const vector output = {15};
1535 ASSERT_EQ(output, Solution::luckyNumbers(input));
1536 }

引用了 leetcode::lucky_numbers_in_a_matrix::Solution::luckyNumbers().

◆ TEST() [2/3]

leetcode::lucky_numbers_in_a_matrix::TEST ( lucky_numbers_in_a_matrix  ,
case2   
)

在文件 leetcode_test.cpp1538 行定义.

1538 {
1539 vector<vector<int>> input = {{1, 10, 4, 2}, {9, 3, 8, 7}, {15, 16, 17, 12}};
1540 const vector output = {12};
1541 ASSERT_EQ(output, Solution::luckyNumbers(input));
1542 }

引用了 leetcode::lucky_numbers_in_a_matrix::Solution::luckyNumbers().

◆ TEST() [3/3]

leetcode::lucky_numbers_in_a_matrix::TEST ( lucky_numbers_in_a_matrix  ,
case3   
)

在文件 leetcode_test.cpp1544 行定义.

1544 {
1545 vector<vector<int>> input = {{7, 8}, {1, 2}};
1546 const vector output = {7};
1547 ASSERT_EQ(output, Solution::luckyNumbers(input));
1548 }

引用了 leetcode::lucky_numbers_in_a_matrix::Solution::luckyNumbers().