diff options
| author | Thomas Schmucker <ts@its1.de> | 2024-01-02 20:23:16 +0100 |
|---|---|---|
| committer | Thomas Schmucker <ts@its1.de> | 2024-01-02 20:23:16 +0100 |
| commit | 1c2555b3574b9498347b8254ec5be90d9e0015f8 (patch) | |
| tree | f43a5e8dc523af49cdd5a2c7389a3977b0da9c88 /src/day12.cpp | |
| parent | e95d22d3927549caa5c259a59aedaa67d3b636ca (diff) | |
| download | advent-of-code-1c2555b3574b9498347b8254ec5be90d9e0015f8.tar.gz advent-of-code-1c2555b3574b9498347b8254ec5be90d9e0015f8.tar.bz2 advent-of-code-1c2555b3574b9498347b8254ec5be90d9e0015f8.zip | |
clean up
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 | } |
