Partial day 06.

This commit is contained in:
2019-12-06 07:26:46 +01:00
parent 0bf29b1e42
commit f9caa8d1a9
4 changed files with 1502 additions and 0 deletions

1477
2019/inputs/06.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,20 @@
#include <iostream>
#include <regex>
#include "days.hpp"
void aoc2019::day06_part1(std::istream &input, std::ostream &output) {
std::string buffer;
std::regex regex("^([A-Z0-9]+)\\)([A-Z0-9]+)$");
while (std::getline(input, buffer)) {
std::smatch match_results;
if (!std::regex_match(buffer, match_results, regex)) {
std::string error = "Invalid line: ";
error += buffer;
throw std::domain_error(error);
}
}
output << "Not implemented\n";
}

View File

@@ -0,0 +1,11 @@
COM)B
B)C
C)D
D)E
E)F
B)G
G)H
D)I
E)J
J)K
K)L

View File

@@ -0,0 +1 @@
42