Browse Source

cleanup

master
mid-kid 2 years ago
parent
commit
67feeaafee
  1. 4
      d08.cc
  2. BIN
      d08_bigboy.txt.xz

4
d08.cc

@ -21,7 +21,7 @@ Input parse()
unsigned p1(const Input &trees) unsigned p1(const Input &trees)
{ {
int height = trees.size(); int height = trees.size();
int width = trees[0].size(); int width = trees.front().size();
// C++ is nice except when it isn't // C++ is nice except when it isn't
bool (*vis)[width] = (bool (*)[width])new bool[width * height]; bool (*vis)[width] = (bool (*)[width])new bool[width * height];
@ -78,7 +78,7 @@ unsigned p1(const Input &trees)
unsigned p2(const Input &trees) unsigned p2(const Input &trees)
{ {
int height = trees.size(); int height = trees.size();
int width = trees[0].size(); int width = trees.front().size();
unsigned score = 0; unsigned score = 0;
for (int y = 1; y < height - 1; y++) { for (int y = 1; y < height - 1; y++) {

BIN
d08_bigboy.txt.xz

Binary file not shown.
Loading…
Cancel
Save