From 5dde3837a6ecbd372b2d5db0b12969a4b7fbf4f7 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 16 Oct 2025 18:08:53 +0200 Subject: day 11, aoc 2016 --- 2016/src/day10.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to '2016/src/day10.cpp') diff --git a/2016/src/day10.cpp b/2016/src/day10.cpp index 7c1f4f9..851ad9d 100644 --- a/2016/src/day10.cpp +++ b/2016/src/day10.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -9,6 +10,8 @@ using namespace std; using Sink = tuple; +namespace { + vector split(const string& line, char sep) { @@ -23,7 +26,7 @@ split(const string& line, char sep) } map>> -read_file(string_view filename) +read_file(const filesystem::path& filename) { fstream input{ filename }; @@ -84,16 +87,18 @@ solve(map>> bots) // part1 if ( chips.at(0) == 17 && chips.at(1) == 61 ) { - cout << id << endl; + cout << id << '\n'; } chips.clear(); } // part2 - cout << outputs[0] * outputs[1] * outputs[2] << endl; + cout << outputs[0] * outputs[1] * outputs[2] << '\n'; } +} // namespace + int main() { -- cgit v1.3