From 99bfa2520fb9b7215cd1aba92fc48fa6cfed3b92 Mon Sep 17 00:00:00 2001 From: Orfeas <38209077+0xfea5@users.noreply.github.com> Date: Thu, 4 Dec 2025 02:17:48 +0200 Subject: .editorconfig: increase indentation --- day01/solution.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'day01/solution.cpp') diff --git a/day01/solution.cpp b/day01/solution.cpp index 9fb9ec1..33b7550 100644 --- a/day01/solution.cpp +++ b/day01/solution.cpp @@ -13,9 +13,7 @@ auto parse_input(std::istream& is) { std::vector document; for (auto const line : lines) { char direction = line[0]; - std::string out; - ranges::copy(line | views::drop(1), std::back_inserter(out)); - int length = std::stoi(out); + int length = std::stoi(std::ranges::to(line | views::drop(1))); document.push_back(direction == 'R' ? length : -length); } return document; @@ -54,7 +52,6 @@ void part2(auto const& input) { } dial %= DIAL_MAX; old_dial = dial; - std::cerr << answer << ' ' << dial << '\n'; } std::println("{}", answer); } -- cgit v1.2.3