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

  1. Find Players With Zero or One Losses
更多...

class  Solution
 

函数

 TEST (find_players_with_zero_or_one_losses, case1)
 
 TEST (find_players_with_zero_or_one_losses, case2)
 

详细描述

  1. Find Players With Zero or One Losses
  1. 找出输掉零场或一场比赛的玩家

函数说明

◆ TEST() [1/2]

leetcode::find_players_with_zero_or_one_losses::TEST ( find_players_with_zero_or_one_losses  ,
case1   
)

在文件 leetcode_test.cpp2655 行定义.

2655 {
2656 vector<vector<int>> matches = {{1, 3},
2657 {2, 3},
2658 {3, 6},
2659 {5, 6},
2660 {5, 7},
2661 {4, 5},
2662 {4, 8},
2663 {4, 9},
2664 {10, 4},
2665 {10, 9}};
2666 const vector<vector<int>> output = {{1, 2, 10}, {4, 5, 7, 8}};
2667 ASSERT_EQ(output, Solution::findWinners(matches));
2668 }

引用了 leetcode::find_players_with_zero_or_one_losses::Solution::findWinners().

◆ TEST() [2/2]

leetcode::find_players_with_zero_or_one_losses::TEST ( find_players_with_zero_or_one_losses  ,
case2   
)

在文件 leetcode_test.cpp2670 行定义.

2670 {
2671 vector<vector<int>> matches = {{2, 3}, {1, 3}, {5, 4}, {6, 4}};
2672 const vector<vector<int>> output = {{1, 2, 5, 6}, {}};
2673 ASSERT_EQ(output, Solution::findWinners(matches));
2674 }

引用了 leetcode::find_players_with_zero_or_one_losses::Solution::findWinners().