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

LeetCode 2045. 到达目的地的第二短时间 更多...

class  Solution
 
struct  status
 

函数

 TEST (second_minimum_time_to_reach_destination, case1)
 
 TEST (second_minimum_time_to_reach_destination, case2)
 

详细描述

LeetCode 2045. 到达目的地的第二短时间

函数说明

◆ TEST() [1/2]

leetcode::second_minimum_time_to_reach_destination::TEST ( second_minimum_time_to_reach_destination  ,
case1   
)

在文件 leetcode_test.cpp1020 行定义.

1020 {
1021 int inputs[][2] = {{1, 2}, {1, 3}, {1, 4}, {3, 4}, {4, 5}};
1022 auto vec = vector<vector<int>>();
1023 for(const auto *input: inputs) {
1024 auto n_vec = vector<int>();
1025 n_vec.resize(2);
1026 n_vec[0] = input[0];
1027 n_vec[1] = input[1];
1028 vec.push_back(n_vec);
1029 }
1030 ASSERT_EQ(13, Solution::secondMinimum(5, vec, 3, 5));
1031 }
int vec[100010]
Definition: pat.cpp:5095

引用了 leetcode::second_minimum_time_to_reach_destination::Solution::secondMinimum() , 以及 pat::a::a7_2::vec.

◆ TEST() [2/2]

leetcode::second_minimum_time_to_reach_destination::TEST ( second_minimum_time_to_reach_destination  ,
case2   
)

在文件 leetcode_test.cpp1033 行定义.

1033 {
1034 int inputs[][2] = {{1, 2}};
1035 auto vec = vector<vector<int>>();
1036 for(const auto *input: inputs) {
1037 auto n_vec = vector<int>();
1038 n_vec.resize(2);
1039 n_vec[0] = input[0];
1040 n_vec[1] = input[1];
1041 vec.push_back(n_vec);
1042 }
1043 ASSERT_EQ(11, Solution::secondMinimum(2, vec, 3, 2));
1044 }

引用了 leetcode::second_minimum_time_to_reach_destination::Solution::secondMinimum() , 以及 pat::a::a7_2::vec.