layout
This commit is contained in:
parent
c86e71ec09
commit
8c3b0ad0cf
10
2023/04.cpp
10
2023/04.cpp
|
@ -48,10 +48,14 @@ auto CountWins(std::vector<Card>& cards) -> std::vector<std::size_t>
|
|||
|
||||
for (auto& card : cards)
|
||||
{
|
||||
std::sort(card.mine.begin(), card.mine.end());
|
||||
std::sort(card.mine .begin(), card.mine .end());
|
||||
std::sort(card.winners.begin(), card.winners.end());
|
||||
auto const c = std::set_intersection(card.mine.begin(), card.mine.end(), card.winners.begin(), card.winners.end(), Counter<std::size_t>{});
|
||||
result.push_back(c);
|
||||
auto const counter =
|
||||
std::set_intersection(
|
||||
card.mine .begin(), card.mine .end(),
|
||||
card.winners.begin(), card.winners.end(),
|
||||
Counter<std::size_t>{});
|
||||
result.push_back(counter);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user