nix: bump flake inputs
This commit is contained in:
parent
67ef6227dc
commit
8618c81b2f
11 changed files with 28 additions and 32 deletions
|
|
@ -39,7 +39,7 @@ def solve(input: List[str]) -> int:
|
|||
# Second step, do flashes
|
||||
has_flashed: Set[Point] = set()
|
||||
while len(flashes := (excited(levels) - has_flashed)) > 0:
|
||||
for (i, j) in flashes:
|
||||
for i, j in flashes:
|
||||
has_flashed.add((i, j))
|
||||
for x, y in neighbours_of((i, j)):
|
||||
levels[x][y] += 1
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def solve(input: List[str]) -> int:
|
|||
# Second step, do flashes
|
||||
has_flashed: Set[Point] = set()
|
||||
while len(flashes := (excited(levels) - has_flashed)) > 0:
|
||||
for (i, j) in flashes:
|
||||
for i, j in flashes:
|
||||
has_flashed.add((i, j))
|
||||
for x, y in neighbours_of((i, j)):
|
||||
levels[x][y] += 1
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ def solve(input: List[str]) -> int:
|
|||
def parse() -> Map:
|
||||
res: Map = defaultdict(set)
|
||||
|
||||
for (start, to) in map(lambda s: s.split("-"), input):
|
||||
for start, to in map(lambda s: s.split("-"), input):
|
||||
res[start].add(to)
|
||||
res[to].add(start)
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ def solve(input: List[str]) -> int:
|
|||
def parse() -> Map:
|
||||
res: Map = defaultdict(set)
|
||||
|
||||
for (start, to) in map(lambda s: s.split("-"), input):
|
||||
for start, to in map(lambda s: s.split("-"), input):
|
||||
res[start].add(to)
|
||||
res[to].add(start)
|
||||
|
||||
|
|
|
|||
|
|
@ -61,11 +61,11 @@ def solve(input: List[str]) -> int:
|
|||
for x in range(map.dimensions.x):
|
||||
print(
|
||||
"".join(
|
||||
"v"
|
||||
if Point(x, y) in map.south
|
||||
else ">"
|
||||
if Point(x, y) in map.east
|
||||
else "."
|
||||
(
|
||||
"v"
|
||||
if Point(x, y) in map.south
|
||||
else ">" if Point(x, y) in map.east else "."
|
||||
)
|
||||
for y in range(map.dimensions.y)
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue