aboutsummaryrefslogtreecommitdiff
path: root/src/2015/day15/aoc.cpp
blob: 6a6867c2d4621460f419e6ef1acf05b0a6749a28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "aoc.h"

namespace aoc2015 {

int day15(line_view file, int* cals) {
  recipe r;
  per_line(file, [&r](line_view lv) {
    r.parse(lv);
    return true;
  });

  std::vector<int> combos;
  int best{0};
  r.measure(100, 0, combos, &best, cals);
  return best;
}
} // namespace aoc2015