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

namespace aoc2015 {
std::pair<int, int> day6(line_view file) {
  grid<Bit, 1000>* grid1 = new grid<Bit,1000>;
  grid<int8_t, 1000>* grid2 = new grid<int8_t, 1000>;
  per_line(file, [&grid1, &grid2](line_view lv) {
    grid1->parse(lv);
    grid2->parse(lv);
    return true;
  });
  return {grid1->store_.count(), grid2->store_.count()};
}
} // namespace aoc2015