diff options
Diffstat (limited to 'src/day12.cpp')
| -rw-r--r-- | src/day12.cpp | 7 |
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 | ||
| 106 | void | 106 | void |
| 107 | part1() | 107 | part1(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() | |||
| 122 | int | 120 | int |
| 123 | main() | 121 | main() |
| 124 | { | 122 | { |
| 125 | part1(); | 123 | const auto input = read_file("data/day12.txt"); |
| 124 | part1(input); | ||
| 126 | } | 125 | } |
