#include <leetcode.h>
|
static vector< vector< int > > | findWinners (vector< vector< int > > &matches) |
|
◆ findWinners()
vector< vector< int > > leetcode::find_players_with_zero_or_one_losses::Solution::findWinners |
( |
vector< vector< int > > & |
matches | ) |
|
|
static |
在文件 leetcode.cpp 第 5555 行定义.
5556 map<unsigned, unsigned> lose;
5557 for(
auto match: matches) {
5558 lose[match[0]] += 0;
5559 lose[match[1]] += 1;
5561 vector<vector<int>> ans(2);
5564 for(
auto [player, count]: lose) {
5566 ans1.push_back(player);
5567 }
else if(count == 1) {
5568 ans2.push_back(player);
被这些函数引用 leetcode::find_players_with_zero_or_one_losses::TEST().
该类的文档由以下文件生成: