diff --git a/2023/04.cpp b/2023/04.cpp index a860980..eac9bfb 100644 --- a/2023/04.cpp +++ b/2023/04.cpp @@ -48,10 +48,14 @@ auto CountWins(std::vector& cards) -> std::vector 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{}); - result.push_back(c); + auto const counter = + std::set_intersection( + card.mine .begin(), card.mine .end(), + card.winners.begin(), card.winners.end(), + Counter{}); + result.push_back(counter); } return result;