aboutsummaryrefslogtreecommitdiff
path: root/src/2015/day19/aoc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/2015/day19/aoc.cpp')
-rw-r--r--src/2015/day19/aoc.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/2015/day19/aoc.cpp b/src/2015/day19/aoc.cpp
index 1b3ee2a..b665871 100644
--- a/src/2015/day19/aoc.cpp
+++ b/src/2015/day19/aoc.cpp
@@ -1,4 +1,16 @@
#include "aoc.h"
namespace aoc2015 {
+
+int day19(line_view file) {
+ molecule m;
+ per_line(file, [&m](line_view lv) {
+ m.parse(lv);
+ return true;
+ });
+ std::map<int, std::vector<molecule::change>> changes;
+ m.check(changes);
+ return m.distinct(changes);
}
+
+} // namespace aoc2015