generated from public/aoc_template
Day22 - foreign input
This commit is contained in:
parent
561f3ed765
commit
23ed2dbb66
13
day22.py
13
day22.py
@ -35,12 +35,14 @@ class Day(AOCDay):
|
|||||||
inputs = [
|
inputs = [
|
||||||
[
|
[
|
||||||
(5, "input22_test"),
|
(5, "input22_test"),
|
||||||
|
(490, "input22_dennis"),
|
||||||
(527, "input22"),
|
(527, "input22"),
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
(7, "input22_test"),
|
(7, "input22_test"),
|
||||||
|
(96356, "input22_dennis"),
|
||||||
(100376, "input22"),
|
(100376, "input22"),
|
||||||
]
|
],
|
||||||
]
|
]
|
||||||
|
|
||||||
def parse_input(self) -> set[tuple[tuple[int, int, int], ...]]:
|
def parse_input(self) -> set[tuple[tuple[int, int, int], ...]]:
|
||||||
@ -50,12 +52,7 @@ class Day(AOCDay):
|
|||||||
x1, z1, y1 = map(int, a.split(","))
|
x1, z1, y1 = map(int, a.split(","))
|
||||||
x2, z2, y2 = map(int, b.split(","))
|
x2, z2, y2 = map(int, b.split(","))
|
||||||
bricks.add(
|
bricks.add(
|
||||||
tuple(
|
tuple((x, y, z) for x in range(x1, x2 + 1) for y in range(y1, y2 + 1) for z in range(z1, z2 + 1))
|
||||||
(x, y, z)
|
|
||||||
for x in range(x1, x2 + 1)
|
|
||||||
for y in range(y1, y2 + 1)
|
|
||||||
for z in range(z1, z2 + 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return bricks
|
return bricks
|
||||||
@ -69,6 +66,6 @@ class Day(AOCDay):
|
|||||||
return sum(c[1] for c in (drop(dropped_bricks - {x}) for x in dropped_bricks))
|
return sum(c[1] for c in (drop(dropped_bricks - {x}) for x in dropped_bricks))
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == "__main__":
|
||||||
day = Day(2023, 22)
|
day = Day(2023, 22)
|
||||||
day.run(verbose=True)
|
day.run(verbose=True)
|
||||||
|
|||||||
1443
inputs/input22_dennis
Normal file
1443
inputs/input22_dennis
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user