Solutions for 2022, as well as 2015-2018 and 2019 up to day 11

This commit is contained in:
Chris Alge 2023-03-12 15:20:02 +01:00
commit 1895197c49
722 changed files with 375457 additions and 0 deletions

View file

@ -0,0 +1,8 @@
[package]
name = "day14-regolith_reservoir"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

View file

@ -0,0 +1,150 @@
--- Day 14: Regolith Reservoir ---
The distress signal leads you to a giant waterfall! Actually, hang on - the signal seems like it's coming from the waterfall itself, and that doesn't make any sense. However, you do notice a little path that leads behind the waterfall.
Correction: the distress signal leads you behind a giant waterfall! There seems to be a large cave system here, and the signal definitely leads further inside.
As you begin to make your way deeper underground, you feel the ground rumble for a moment. Sand begins pouring into the cave! If you don't quickly figure out where the sand is going, you could quickly become trapped!
Fortunately, your familiarity with analyzing the path of falling material will come in handy here. You scan a two-dimensional vertical slice of the cave above you (your puzzle input) and discover that it is mostly air with structures made of rock.
Your scan traces the path of each solid rock structure and reports the x,y coordinates that form the shape of the path, where x represents distance to the right and y represents distance down. Each path appears as a single line of text in your scan. After the first point of each path, each point indicates the end of a straight horizontal or vertical line to be drawn from the previous point. For example:
498,4 -> 498,6 -> 496,6
503,4 -> 502,4 -> 502,9 -> 494,9
This scan means that there are two paths of rock; the first path consists of two straight lines, and the second path consists of three straight lines. (Specifically, the first path consists of a line of rock from 498,4 through 498,6 and another line of rock from 498,6 through 496,6.)
The sand is pouring into the cave from point 500,0.
Drawing rock as #, air as ., and the source of the sand as +, this becomes:
4 5 5
9 0 0
4 0 3
0 ......+...
1 ..........
2 ..........
3 ..........
4 ....#...##
5 ....#...#.
6 ..###...#.
7 ........#.
8 ........#.
9 #########.
Sand is produced one unit at a time, and the next unit of sand is not produced until the previous unit of sand comes to rest. A unit of sand is large enough to fill one tile of air in your scan.
A unit of sand always falls down one step if possible. If the tile immediately below is blocked (by rock or sand), the unit of sand attempts to instead move diagonally one step down and to the left. If that tile is blocked, the unit of sand attempts to instead move diagonally one step down and to the right. Sand keeps moving as long as it is able to do so, at each step trying to move down, then down-left, then down-right. If all three possible destinations are blocked, the unit of sand comes to rest and no longer moves, at which point the next unit of sand is created back at the source.
So, drawing sand that has come to rest as o, the first unit of sand simply falls straight down and then stops:
......+...
..........
..........
..........
....#...##
....#...#.
..###...#.
........#.
......o.#.
#########.
The second unit of sand then falls straight down, lands on the first one, and then comes to rest to its left:
......+...
..........
..........
..........
....#...##
....#...#.
..###...#.
........#.
.....oo.#.
#########.
After a total of five units of sand have come to rest, they form this pattern:
......+...
..........
..........
..........
....#...##
....#...#.
..###...#.
......o.#.
....oooo#.
#########.
After a total of 22 units of sand:
......+...
..........
......o...
.....ooo..
....#ooo##
....#ooo#.
..###ooo#.
....oooo#.
...ooooo#.
#########.
Finally, only two more units of sand can possibly come to rest:
......+...
..........
......o...
.....ooo..
....#ooo##
...o#ooo#.
..###ooo#.
....oooo#.
.o.ooooo#.
#########.
Once all 24 units of sand shown above have come to rest, all further sand flows out the bottom, falling into the endless void. Just for fun, the path any new sand takes before falling forever is shown here with ~:
.......+...
.......~...
......~o...
.....~ooo..
....~#ooo##
...~o#ooo#.
..~###ooo#.
..~..oooo#.
.~o.ooooo#.
~#########.
~..........
~..........
~..........
Using your scan, simulate the falling sand. How many units of sand come to rest before sand starts flowing into the abyss below?
--- Part Two ---
You realize you misread the scan. There isn't an endless void at the bottom of the scan - there's floor, and you're standing on it!
You don't have time to scan the floor, so assume the floor is an infinite horizontal line with a y coordinate equal to two plus the highest y coordinate of any point in your scan.
In the example above, the highest y coordinate of any point is 9, and so the floor is at y=11. (This is as if your scan contained one extra rock path like -infinity,11 -> infinity,11.) With the added floor, the example above now looks like this:
...........+........
....................
....................
....................
.........#...##.....
.........#...#......
.......###...#......
.............#......
.............#......
.....#########......
....................
<-- etc #################### etc -->
To find somewhere safe to stand, you'll need to simulate falling sand until a unit of sand comes to rest at 500,0, blocking the source entirely and stopping the flow of sand into the cave. In the example above, the situation finally looks like this after 93 units of sand come to rest:
............o............
...........ooo...........
..........ooooo..........
.........ooooooo.........
........oo#ooo##o........
.......ooo#ooo#ooo.......
......oo###ooo#oooo......
.....oooo.oooo#ooooo.....
....oooooooooo#oooooo....
...ooo#########ooooooo...
..ooooo.......ooooooooo..
#########################
Using your scan, simulate the falling sand until the source of the sand becomes blocked. How many units of sand come to rest?

View file

@ -0,0 +1,155 @@
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
485,24 -> 485,25 -> 496,25 -> 496,24
485,24 -> 485,25 -> 496,25 -> 496,24
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
519,149 -> 524,149
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
494,16 -> 499,16
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
504,83 -> 508,83
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
516,83 -> 520,83
514,88 -> 514,89 -> 530,89
520,155 -> 525,155
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
522,140 -> 527,140
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
502,22 -> 507,22
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
525,137 -> 530,137
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,152 -> 528,152
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
507,77 -> 511,77
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
536,140 -> 541,140
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
543,140 -> 548,140
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
492,28 -> 492,29 -> 509,29
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
518,161 -> 527,161 -> 527,160
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
518,161 -> 527,161 -> 527,160
531,131 -> 536,131
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
501,85 -> 505,85
497,13 -> 502,13
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
507,85 -> 511,85
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
513,155 -> 518,155
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
532,137 -> 537,137
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
485,24 -> 485,25 -> 496,25 -> 496,24
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
495,22 -> 500,22
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
516,152 -> 521,152
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
513,81 -> 517,81
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
530,152 -> 535,152
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
505,19 -> 510,19
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
491,19 -> 496,19
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
522,146 -> 527,146
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
533,149 -> 538,149
541,155 -> 546,155
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
488,22 -> 493,22
539,137 -> 544,137
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
510,83 -> 514,83
528,134 -> 533,134
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
537,152 -> 542,152
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
495,85 -> 499,85
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
501,16 -> 506,16
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
514,88 -> 514,89 -> 530,89
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
504,79 -> 508,79
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
525,143 -> 530,143
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
529,146 -> 534,146
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
526,149 -> 531,149
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
527,155 -> 532,155
507,81 -> 511,81
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
492,28 -> 492,29 -> 509,29
535,134 -> 540,134
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
510,79 -> 514,79
529,140 -> 534,140
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
498,83 -> 502,83
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
519,85 -> 523,85
498,19 -> 503,19
501,81 -> 505,81
513,85 -> 517,85
509,22 -> 514,22
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
534,155 -> 539,155

View file

@ -0,0 +1,160 @@
use std::{fs, collections::HashSet};
#[derive(PartialEq)]
enum Status { Resting, Falling, Blocked }
#[derive(PartialEq)]
enum Mode { EndlessVoid, WithFloor }
#[derive(PartialEq, Eq, Hash, Clone)]
struct Position {
x: usize,
y: usize,
}
impl Position {
fn from(string: &str) -> Self {
let components = string.split(',').collect::<Vec<_>>().iter().map(|i| i.parse().unwrap()).collect::<Vec<usize>>();
if !components.len() == 2 {
panic!("unable to parse {string} into Position");
}
Self {
x: components[0],
y: components[1],
}
}
}
struct Sand {
position: Position,
ymax: usize,
}
const ORIGIN: Position = Position {
x: 500,
y: 0,
};
impl Sand {
//fn fall(&mut self, cave: &Vec<Position>, other_sand: &mut Vec<Position>, mode: &Mode) -> Status {
fn fall(&mut self, cave: &HashSet<Position>, other_sand: &mut HashSet<Position>, mode: &Mode) -> Status {
// return if we fall below all structures
if *mode == Mode::EndlessVoid && self.position.y >= self.ymax {
return Status::Falling;
}
// or we reached the floor.
if *mode == Mode::WithFloor && self.position.y > self.ymax {
other_sand.insert(self.position.clone());
return Status::Resting;
}
// Fall down if possible
if !cave.contains(&Position{ x: self.position.x, y: self.position.y+1 }) && !other_sand.contains(&Position { x: self.position.x, y: self.position.y+1 }) {
self.position.y += 1;
return self.fall(cave, other_sand, mode);
}
// Next try falling left
if !cave.contains(&Position{ x: self.position.x-1, y: self.position.y+1 }) && !other_sand.contains(&Position { x: self.position.x-1, y: self.position.y+1 }) {
self.position.x -= 1;
self.position.y += 1;
return self.fall(cave, other_sand, mode);
}
// Next try falling right
if !cave.contains(&Position{ x: self.position.x+1, y: self.position.y+1 }) && !other_sand.contains(&Position { x: self.position.x+1, y: self.position.y+1 }) {
self.position.x += 1;
self.position.y += 1;
return self.fall(cave, other_sand, mode);
}
// Else we can't fall any more.
other_sand.insert(self.position.clone());
if self.position == ORIGIN {
Status::Blocked
} else {
Status::Resting
}
}
fn spawn(cave: &HashSet<Position>, ymax: usize, mode: &Mode) -> HashSet<Position> {
let mut other_sand = HashSet::new();
loop {
let mut new_unit = Sand {
position: ORIGIN,
ymax,
};
let new_status = new_unit.fall(cave, &mut other_sand, mode);
if new_status != Status::Resting {
break;
}
}
other_sand
}
}
fn read_file(path: &str) -> String {
fs::read_to_string(path)
.expect("File not Found")
}
fn positions_of_formation(formation: &str) -> Vec<Position> {
let mut blocked = Vec::new();
let corners = formation.split(" -> ")
.map(Position::from)
.collect::<Vec<Position>>();
if corners.len() == 1 {
return corners;
}
for pair in corners.windows(2).collect::<Vec<&[Position]>>() {
let minx = pair[0].x.min(pair[1].x);
let maxx = pair[0].x.max(pair[1].x);
let miny = pair[0].y.min(pair[1].y);
let maxy = pair[0].y.max(pair[1].y);
for x in minx..=maxx {
for y in miny..=maxy {
blocked.push(Position{ x, y });
}
}
}
blocked
}
fn get_cave(scan: &str) -> (HashSet<Position>, usize){
let cave = scan.lines()
.flat_map(|formation| positions_of_formation(formation).iter()
.cloned()
.collect::<HashSet<_>>())
.collect::<HashSet<_>>();
let ymax = cave.iter()
.map(|pos| pos.y)
.max()
.unwrap();
(cave, ymax)
}
fn main() {
let scan = read_file("input");
let (cave, ymax) = get_cave(&scan);
let endless_sand = Sand::spawn(&cave, ymax, &Mode::EndlessVoid);
println!("In Case of an endless void, {} units of sand will come to a rest", endless_sand.len());
let sand_with_floor = Sand::spawn(&cave, ymax, &Mode::WithFloor);
println!("In Case of a floor, {} units of sand will be spawned", sand_with_floor.len());
}
#[test]
fn sample_input() {
let scan = read_file("tests/sample_input");
let (cave, ymax) = get_cave(&scan);
assert_eq!(Sand::spawn(&cave, ymax, &Mode::EndlessVoid).len(), 24);
assert_eq!(Sand::spawn(&cave, ymax, &Mode::WithFloor).len(), 93);
}
#[test]
fn challenge_input() {
let scan = read_file("tests/input");
let (cave, ymax) = get_cave(&scan);
assert_eq!(Sand::spawn(&cave, ymax, &Mode::EndlessVoid).len(), 979);
assert_eq!(Sand::spawn(&cave, ymax, &Mode::WithFloor).len(), 29044);
}

View file

@ -0,0 +1,155 @@
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
485,24 -> 485,25 -> 496,25 -> 496,24
485,24 -> 485,25 -> 496,25 -> 496,24
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
519,149 -> 524,149
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
494,16 -> 499,16
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
504,83 -> 508,83
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
516,83 -> 520,83
514,88 -> 514,89 -> 530,89
520,155 -> 525,155
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
522,140 -> 527,140
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
502,22 -> 507,22
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
525,137 -> 530,137
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,152 -> 528,152
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
507,77 -> 511,77
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
536,140 -> 541,140
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
543,140 -> 548,140
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
492,28 -> 492,29 -> 509,29
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
518,161 -> 527,161 -> 527,160
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
518,161 -> 527,161 -> 527,160
531,131 -> 536,131
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
501,85 -> 505,85
497,13 -> 502,13
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
507,85 -> 511,85
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
513,155 -> 518,155
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
532,137 -> 537,137
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
485,24 -> 485,25 -> 496,25 -> 496,24
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
495,22 -> 500,22
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
516,152 -> 521,152
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
513,81 -> 517,81
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
529,128 -> 529,123 -> 529,128 -> 531,128 -> 531,123 -> 531,128 -> 533,128 -> 533,123 -> 533,128
530,152 -> 535,152
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
505,19 -> 510,19
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
491,19 -> 496,19
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
522,146 -> 527,146
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
533,149 -> 538,149
541,155 -> 546,155
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
488,22 -> 493,22
539,137 -> 544,137
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
510,83 -> 514,83
528,134 -> 533,134
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
537,152 -> 542,152
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
495,85 -> 499,85
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
501,16 -> 506,16
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
514,88 -> 514,89 -> 530,89
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
504,79 -> 508,79
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
525,143 -> 530,143
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
529,146 -> 534,146
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
526,149 -> 531,149
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
527,155 -> 532,155
507,81 -> 511,81
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
492,28 -> 492,29 -> 509,29
535,134 -> 540,134
499,65 -> 499,68 -> 491,68 -> 491,74 -> 508,74 -> 508,68 -> 504,68 -> 504,65
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
536,105 -> 536,109 -> 533,109 -> 533,115 -> 545,115 -> 545,109 -> 540,109 -> 540,105
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
485,45 -> 485,47 -> 480,47 -> 480,53 -> 496,53 -> 496,47 -> 489,47 -> 489,45
510,79 -> 514,79
529,140 -> 534,140
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
498,83 -> 502,83
494,56 -> 494,59 -> 489,59 -> 489,62 -> 501,62 -> 501,59 -> 500,59 -> 500,56
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
519,85 -> 523,85
498,19 -> 503,19
501,81 -> 505,81
513,85 -> 517,85
509,22 -> 514,22
523,102 -> 523,92 -> 523,102 -> 525,102 -> 525,99 -> 525,102 -> 527,102 -> 527,95 -> 527,102 -> 529,102 -> 529,101 -> 529,102 -> 531,102 -> 531,101 -> 531,102 -> 533,102 -> 533,99 -> 533,102 -> 535,102 -> 535,94 -> 535,102 -> 537,102 -> 537,92 -> 537,102
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
509,174 -> 509,170 -> 509,174 -> 511,174 -> 511,169 -> 511,174 -> 513,174 -> 513,169 -> 513,174 -> 515,174 -> 515,167 -> 515,174 -> 517,174 -> 517,166 -> 517,174 -> 519,174 -> 519,173 -> 519,174 -> 521,174 -> 521,164 -> 521,174 -> 523,174 -> 523,172 -> 523,174
479,42 -> 479,33 -> 479,42 -> 481,42 -> 481,32 -> 481,42 -> 483,42 -> 483,34 -> 483,42 -> 485,42 -> 485,36 -> 485,42 -> 487,42 -> 487,33 -> 487,42
534,155 -> 539,155

View file

@ -0,0 +1,2 @@
498,4 -> 498,6 -> 496,6
503,4 -> 502,4 -> 502,9 -> 494,9