aboutsummaryrefslogtreecommitdiff
path: root/src/day12.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/day12.cpp')
-rw-r--r--src/day12.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/day12.cpp b/src/day12.cpp
index 31a2739..b01b2fb 100644
--- a/src/day12.cpp
+++ b/src/day12.cpp
@@ -104,10 +104,8 @@ brute_force(string_view puzzle, const vector<long>& nums)
104} 104}
105 105
106void 106void
107part1() 107part1(const vector<string>& input)
108{ 108{
109 const auto input = read_file("data/day12.txt");
110
111 auto sum = 0L; 109 auto sum = 0L;
112 for ( const auto& line: input ) { 110 for ( const auto& line: input ) {
113 auto parts = split(line, ' '); 111 auto parts = split(line, ' ');
@@ -122,5 +120,6 @@ part1()
122int 120int
123main() 121main()
124{ 122{
125 part1(); 123 const auto input = read_file("data/day12.txt");
124 part1(input);
126} 125}