We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6571b02 commit b095fbbCopy full SHA for b095fbb
src/main/scala/eu/sim642/adventofcode2025/Day12.scala
@@ -41,14 +41,12 @@ object Day12 {
41
if (shapeI < 0)
42
true // nothing more to fit
43
else {
44
- //val newShapeCounts = shapeCounts.updated(shapeI, shapeCounts(shapeI) - 1)
45
- //val shape = shapes(shapeI)
46
if (poss.isEmpty)
47
false
48
49
val pos = poss.head
50
//print(s"$indent $pos")
51
- val todo = region.size.x * region.size.y - pos.x * region.size.y - pos.y
+ val todo = region.size.x * region.size.y - pos.x * region.size.y - pos.y - (if (pos.x == shapeOrientationBox.max.x) pos.y * 2 else 0)
52
val areaLowerBound = // only counting the #-s in shapes
53
shapes
54
.map(_.countGrid(identity))
0 commit comments