Skip to content

Commit

Permalink
Merge branch 'aoc' of https://github.com/Akuli/jou into aoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Dec 23, 2023
2 parents 7b34d16 + 0d2a383 commit 0c12304
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions examples/aoc2023/day18/part1.jou
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ def read_input_to_grid(filename: byte*) -> Grid:
append_blank_row(&grid)
grid.transpose()

assert strlen(grid.data) == (grid.width + 1)*grid.height
grid.set([x, y], '#')
assert strlen(grid.data) == (grid.width + 1)*grid.height

fclose(f)
return grid
Expand Down
2 changes: 1 addition & 1 deletion examples/aoc2023/day20/part2.jou
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def main() -> int:
# `--> flip-flop --> ... --> conjunction --> conjunction --|
# `--> output conjunction --> rx
#
# I call each row from flip-flop to single-source-conjunction a channel.
# I call each row from flip-flop to just before output conjunction a channel.
channels: Module*[2][10]

assert rx->nsources == 1
Expand Down
2 changes: 1 addition & 1 deletion examples/aoc2023/day23/part2.jou
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def longest_path_dfs(graph: Graph*, avoid: bool*, current: int, depth: int) -> i
return 0

assert not avoid[current]
avoid[current] = True # must reset before returning
avoid[current] = True

best = 0
for next = 0; next < graph->num_nodes; next++:
Expand Down

0 comments on commit 0c12304

Please sign in to comment.