diff options
| author | An0nSaiko <porfeas12@gmail.com> | 2022-12-17 06:04:19 +0200 |
|---|---|---|
| committer | An0nSaiko <porfeas12@gmail.com> | 2022-12-17 06:04:19 +0200 |
| commit | c19d3d6d50862b8847e87f018736252dc5e3129f (patch) | |
| tree | bca50fe98ea7482546a7ceddbedb93531075a1d7 /day14 | |
| parent | Day 15 (diff) | |
| download | aoc22-c19d3d6d50862b8847e87f018736252dc5e3129f.tar.gz aoc22-c19d3d6d50862b8847e87f018736252dc5e3129f.zip | |
Day 16 (part1)
Diffstat (limited to 'day14')
| -rw-r--r-- | day14/solution.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/day14/solution.nim b/day14/solution.nim index 0056704..7816d25 100644 --- a/day14/solution.nim +++ b/day14/solution.nim | |||
| @@ -33,7 +33,7 @@ proc parseFile(content: string): HashSet[Point] = | |||
| 33 | # a = begin, b = end | 33 | # a = begin, b = end |
| 34 | for i, a in rocks[0..^2]: | 34 | for i, a in rocks[0..^2]: |
| 35 | let b = rocks[i+1] | 35 | let b = rocks[i+1] |
| 36 | echo fmt"a = {a}, b = {b}" | 36 | # echo fmt"a = {a}, b = {b}" |
| 37 | for col in min(a.col, b.col) .. max(a.col, b.col): | 37 | for col in min(a.col, b.col) .. max(a.col, b.col): |
| 38 | let toPush = Point((a.row, col)) | 38 | let toPush = Point((a.row, col)) |
| 39 | result.incl(toPush) | 39 | result.incl(toPush) |
| @@ -105,7 +105,7 @@ let content = readFile("./input.txt") | |||
| 105 | let occupied = parseFile(content) | 105 | let occupied = parseFile(content) |
| 106 | 106 | ||
| 107 | occupied.draw() | 107 | occupied.draw() |
| 108 | echo fmt"{maxRow}, {minCol}-{maxCol}" | 108 | # echo fmt"{maxRow}, {minCol}-{maxCol}" |
| 109 | echo solve(occupied) | 109 | echo solve(occupied) |
| 110 | part2 = true | 110 | part2 = true |
| 111 | echo solve(occupied) | 111 | echo solve(occupied) |
