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

LeetCode 1706. Where Will the Ball Fall 更多...

class  Solution
 

函数

 TEST (where_will_the_ball_fall, case1)
 
 TEST (where_will_the_ball_fall, case2)
 
 TEST (where_will_the_ball_fall, case3)
 

详细描述

LeetCode 1706. Where Will the Ball Fall

函数说明

◆ TEST() [1/3]

leetcode::where_will_the_ball_fall::TEST ( where_will_the_ball_fall  ,
case1   
)

在文件 leetcode_test.cpp1749 行定义.

1749 {
1750 vector<vector<int>> input = {{1, 1, 1, -1, -1}, {1, 1, 1, -1, -1}, {-1, -1, -1, 1, 1}, {1, 1, 1, 1, -1}, {-1, -1, -1, -1, -1}};
1751 const vector output = {1, -1, -1, -1, -1};
1752 ASSERT_EQ(output, Solution::findBall(input));
1753 }

引用了 leetcode::where_will_the_ball_fall::Solution::findBall().

◆ TEST() [2/3]

leetcode::where_will_the_ball_fall::TEST ( where_will_the_ball_fall  ,
case2   
)

在文件 leetcode_test.cpp1755 行定义.

1755 {
1756 vector<vector<int>> input = {{-1}};
1757 const vector output = {-1};
1758 ASSERT_EQ(output, Solution::findBall(input));
1759 }

引用了 leetcode::where_will_the_ball_fall::Solution::findBall().

◆ TEST() [3/3]

leetcode::where_will_the_ball_fall::TEST ( where_will_the_ball_fall  ,
case3   
)

在文件 leetcode_test.cpp1761 行定义.

1761 {
1762 vector<vector<int>> input = {{1, 1, 1, 1, 1, 1}, {-1, -1, -1, -1, -1, -1}, {1, 1, 1, 1, 1, 1}, {-1, -1, -1, -1, -1, -1}};
1763 const vector output = {0, 1, 2, 3, 4, -1};
1764 ASSERT_EQ(output, Solution::findBall(input));
1765 }

引用了 leetcode::where_will_the_ball_fall::Solution::findBall().