nix: bump flake inputs

This commit is contained in:
Bruno BELANYI 2024-11-23 18:42:21 +00:00
parent 67ef6227dc
commit 8618c81b2f
11 changed files with 28 additions and 32 deletions

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)
)
)