More cleanup

This commit is contained in:
Christian
2024-12-11 08:56:38 +01:00
parent ca68f92433
commit 2f960f83eb

View File

@@ -22,13 +22,13 @@ object Day08 extends Solver(8):
.flatMap((a, b) => Iterator(a + a - b, b + b - a)) .flatMap((a, b) => Iterator(a + a - b, b + b - a))
.filter(grid.contains) .filter(grid.contains)
) )
.toSet .distinct
.size .size
def part2: Int = def part2: Int =
antennae antennae
.flatMap(_.pairs.flatMap(p => antinodes(p._1, p._2))) .flatMap(_.pairs.flatMap(p => antinodes(p._1, p._2)))
.toSet .distinct
.size .size
def run(input: os.ReadablePath): (Timings, Solution) = def run(input: os.ReadablePath): (Timings, Solution) =
val (pre_time, ctx) = timed { Ctx(input) } val (pre_time, ctx) = timed { Ctx(input) }