More cleanup
This commit is contained in:
@@ -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) }
|
||||||
|
|||||||
Reference in New Issue
Block a user