From 5b41f34883a915057269b2c3b691bb2300bf368e Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Thu, 3 Dec 2020 00:32:02 -0500 Subject: [PATCH] Reformat day 3 --- day3/day3.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/day3/day3.cpp b/day3/day3.cpp index a11fdba..89f95b4 100644 --- a/day3/day3.cpp +++ b/day3/day3.cpp @@ -42,14 +42,18 @@ int part1(const std::vector &input) { long part2(const std::vector &input) { // deltas in the x and y directions respectively - std::vector> deltas{std::pair(1, 1), std::pair(3, 1), - std::pair(5, 1), std::pair(7, 1), - std::pair(1, 2)}; + std::vector> deltas{ + std::pair(1, 1), + std::pair(3, 1), + std::pair(5, 1), + std::pair(7, 1), + std::pair(1, 2), + }; - return std::reduce(std::execution::par, deltas.begin(), deltas.end(), 1L, - [&](long total, std::pair step_deltas) { - return total * findNumTrees(input, step_deltas.first, step_deltas.second); - }); + return std::reduce( + std::execution::par, deltas.begin(), deltas.end(), 1L, [&](long total, std::pair step_deltas) { + return total * findNumTrees(input, step_deltas.first, step_deltas.second); + }); } int main(int argc, char *argv[]) {