Compare commits
No commits in common. "79ac732c393dda5297870ee2a7c2757559bcd966" and "129447d88f9de471cd0f19b50b2c8712f19b8571" have entirely different histories.
79ac732c39
...
129447d88f
@ -19,7 +19,7 @@ int main() {
|
||||
char throwaway;
|
||||
std::vector<Data> v;
|
||||
while (file >> line.min >> throwaway >> line.max) {
|
||||
v.emplace_back(line);
|
||||
v.push_back(line);
|
||||
file >> throwaway;
|
||||
}
|
||||
std::cout << "Part 1: " << part_1(v) << std::endl;
|
||||
@ -67,7 +67,7 @@ int64_t part_2(const std::vector<Data> &v) {
|
||||
}
|
||||
}
|
||||
|
||||
// todo: dead code, delete me, then inline solve_n
|
||||
// todo: dead code, delete me
|
||||
int64_t foobar = std::accumulate(v.begin(), v.end(), 0, [&ans](int64_t acc, Data d) {
|
||||
for (auto n{d.min}; n <= d.max; ++n) {
|
||||
acc += solve_n(n);
|
||||
|
||||
@ -12,7 +12,7 @@ int main() {
|
||||
std::string line;
|
||||
std::vector<std::string> v;
|
||||
while (std::getline(file, line)) {
|
||||
v.emplace_back(line);
|
||||
v.push_back(line);
|
||||
}
|
||||
std::cout << "Part 1: " << part_1(v) << std::endl;
|
||||
std::cout << "Part 2: " << part_2(v) << std::endl;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user