diff --git a/d08.cc b/d08.cc index 810ffc9..f921f52 100644 --- a/d08.cc +++ b/d08.cc @@ -21,7 +21,7 @@ Input parse() unsigned p1(const Input &trees) { int height = trees.size(); - int width = trees[0].size(); + int width = trees.front().size(); // C++ is nice except when it isn't bool (*vis)[width] = (bool (*)[width])new bool[width * height]; @@ -78,7 +78,7 @@ unsigned p1(const Input &trees) unsigned p2(const Input &trees) { int height = trees.size(); - int width = trees[0].size(); + int width = trees.front().size(); unsigned score = 0; for (int y = 1; y < height - 1; y++) { diff --git a/d08_bigboy.txt.xz b/d08_bigboy.txt.xz new file mode 100644 index 0000000..29e6aae Binary files /dev/null and b/d08_bigboy.txt.xz differ