From 8c3b0ad0cf767d2302987769804125525e82bd62 Mon Sep 17 00:00:00 2001 From: Eric Mertens Date: Mon, 4 Dec 2023 19:32:38 -0800 Subject: [PATCH] layout --- 2023/04.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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;