aboutsummaryrefslogtreecommitdiff
path: root/src/2015/day19/aoc.cpp
blob: b66587161ba90a9b765665fd4be149abbc807302 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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