aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaiwu <kaiwu2004@gmail.com>2022-12-14 13:40:33 +0800
committerkaiwu <kaiwu2004@gmail.com>2022-12-14 13:40:33 +0800
commit0be5a28f1373448194c1266ec33a7e5860e806d9 (patch)
treee909378019f78a72a53ca391835ab1b503f9be3e
parentf46ace5333e19e56e0024fef94c732b8129ef9f3 (diff)
downloadadvent-of-code-0be5a28f1373448194c1266ec33a7e5860e806d9.tar.gz
advent-of-code-0be5a28f1373448194c1266ec33a7e5860e806d9.zip
2022 day14 setup
-rw-r--r--src/2022/day12/aoc.h9
-rw-r--r--src/2022/day13/README.md33
-rw-r--r--src/2022/day13/aoc.cpp40
-rw-r--r--src/2022/day13/aoc.h35
-rw-r--r--src/2022/day13/input3
-rw-r--r--src/2022/day13/input03
-rw-r--r--src/2022/day14/README.md115
-rw-r--r--src/2022/day14/aoc.cpp8
-rw-r--r--src/2022/day14/aoc.h7
-rw-r--r--src/2022/day14/input167
-rw-r--r--src/2022/day14/input02
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--test/test_2022.cpp8
13 files changed, 413 insertions, 18 deletions
diff --git a/src/2022/day12/aoc.h b/src/2022/day12/aoc.h
index 9fe707e..743b41b 100644
--- a/src/2022/day12/aoc.h
+++ b/src/2022/day12/aoc.h
@@ -26,15 +26,6 @@ struct heightmap {
pos start;
pos end;
- char* indent (int s) {
- static char space[100] = {0};
- memset(space, 0 ,100);
- for(int i = 0; i < s; i++) {
- space[i] = ' ';
- }
- return space;
- };
-
char& get(pos p) {
return heights[p.y * col + p.x].h;
}
diff --git a/src/2022/day13/README.md b/src/2022/day13/README.md
index 9e192bc..d2bd84b 100644
--- a/src/2022/day13/README.md
+++ b/src/2022/day13/README.md
@@ -106,3 +106,36 @@ Using these rules, you can determine which of the pairs in the example are in th
What are the indices of the pairs that are already in the right order? (The first pair has index 1, the second pair has index 2, and so on.) In the above example, the pairs in the right order are 1, 2, 4, and 6; the sum of these indices is 13.
Determine which pairs of packets are already in the right order. What is the sum of the indices of those pairs?
+
+--- Part Two ---
+Now, you just need to put all of the packets in the right order. Disregard the blank lines in your list of received packets.
+
+The distress signal protocol also requires that you include two additional divider packets:
+
+[[2]]
+[[6]]
+Using the same rules as before, organize all packets - the ones in your list of received packets as well as the two divider packets - into the correct order.
+
+For the example above, the result of putting the packets in the correct order is:
+
+[]
+[[]]
+[[[]]]
+[1,1,3,1,1]
+[1,1,5,1,1]
+[[1],[2,3,4]]
+[1,[2,[3,[4,[5,6,0]]]],8,9]
+[1,[2,[3,[4,[5,6,7]]]],8,9]
+[[1],4]
+[[2]]
+[3]
+[[4,4],4,4]
+[[4,4],4,4,4]
+[[6]]
+[7,7,7]
+[7,7,7,7]
+[[8,7,6]]
+[9]
+Afterward, locate the divider packets. To find the decoder key for this distress signal, you need to determine the indices of the two divider packets and multiply them together. (The first packet is at index 1, the second packet is at index 2, and so on.) In this example, the divider packets are 10th and 14th, and so the decoder key is 140.
+
+Organize all of the packets into the correct order. What is the decoder key for the distress signal?
diff --git a/src/2022/day13/aoc.cpp b/src/2022/day13/aoc.cpp
index fb71da4..f844116 100644
--- a/src/2022/day13/aoc.cpp
+++ b/src/2022/day13/aoc.cpp
@@ -1,17 +1,44 @@
#include "aoc.h"
#include <iostream>
+#include <algorithm>
+
namespace aoc2022 {
+struct pkt {
+ packet* p;
+ size_t i;
+};
+
+std::pair<int, int> find(const std::vector<pkt>& ps) {
+ size_t s1 = ps.size() - 1;
+ size_t s2 = ps.size() - 2;
+ size_t a{0}, b{0};
+ for(size_t i = 0; i < ps.size(); i++) {
+ if (ps[i].i == s1) a = i;
+ if (ps[i].i == s2) b = i;
+ printf("%zu :", i);
+ ps[i].p->print(0);
+ printf("\n");
+ }
+ printf("%zu %zu\n", a, b);
+ return {a + 1, b + 1};
+}
+
std::pair<int, int> day13(line_view file) {
int count{0};
int pair{0};
+
+
+ std::vector<pkt> all;
packet* ps[2] = {nullptr, nullptr};
- per_line(file, [&pair, &count, &ps](line_view lv){
+ per_line(file, [&pair, &count, &ps, &all](line_view lv){
if (lv.length > 1) {
int i = pair % 2;
- ps[i] = new packet;
+ packet* pkt = new packet;
+ ps[i] = pkt;
const char* p = lv.line;
packet::load(&p, &ps[i]);
+ all.push_back({pkt, (size_t) pair});
if (i == 1 && *(ps[0]) < *(ps[1])) {
printf("group[%d] is in right order\n", pair/2 + 1);
count += pair / 2 + 1;
@@ -20,7 +47,14 @@ std::pair<int, int> day13(line_view file) {
}
return true;
});
- return {count, 0};
+
+ std::sort(all.begin(), all.end(), [](const pkt& p1, const pkt& p2){
+ return *(p1.p) < *(p2.p);
+ });
+
+ auto p = find(all);
+
+ return {count, p.first * p.second};
}
}
diff --git a/src/2022/day13/aoc.h b/src/2022/day13/aoc.h
index 7999e25..bfec96e 100644
--- a/src/2022/day13/aoc.h
+++ b/src/2022/day13/aoc.h
@@ -28,7 +28,7 @@ struct packet {
static void load(const char** p, packet** pp) {
const char* p0 = *p;
- while (*p0 != '\n') {
+ while (*p0 != ']') {
p0++;
if (*p0 >= '0' && *p0 <= '9') {
componet* c = new componet;
@@ -40,14 +40,37 @@ struct packet {
componet* c = new componet;
c->t = is_list;
c->p = new packet;
- load(&p0, &c->p);
(*pp)->ps.push_back(c);
+ load(&p0, &c->p);
+ }
+ }
+ *p = p0 + 1;
+ }
+
+ char* indent (int s) {
+ static char space[100] = {0};
+ memset(space, 0 ,100);
+ for(int i = 0; i < s; i++) {
+ space[i] = ' ';
+ }
+ return space;
+ };
+
+ void print(int d) {
+ printf("[");
+ int i{0};
+ const char* s[] = {"", ","};
+ for(componet* c : ps) {
+ if (c->t == is_int) {
+ printf("%s%d", s[(int) i > 0], c->v);
+ }
+ else {
+ printf("%s", s[(int) i > 0]);
+ c->p->print(d+1);
}
- else if (*p0 == ']') {
- *p = p0;
- return;
- }
+ i++;
}
+ printf("]");
}
static packet* make_packet(int v) {
diff --git a/src/2022/day13/input b/src/2022/day13/input
index 165bc5f..03b9ba0 100644
--- a/src/2022/day13/input
+++ b/src/2022/day13/input
@@ -448,3 +448,6 @@
[[[[3,3,2,6],[],4,4,[9]]],[4,9],[3,[[5,2,10],[]]],[[[6,5],0,[]]],[[[5,4,8]],9,1]]
[[],[[6,0]]]
+[[6]]
+[[2]]
+
diff --git a/src/2022/day13/input0 b/src/2022/day13/input0
index 545cddd..9c9b7a5 100644
--- a/src/2022/day13/input0
+++ b/src/2022/day13/input0
@@ -22,3 +22,6 @@
[1,[2,[3,[4,[5,6,7]]]],8,9]
[1,[2,[3,[4,[5,6,0]]]],8,9]
+[[6]]
+[[2]]
+
diff --git a/src/2022/day14/README.md b/src/2022/day14/README.md
new file mode 100644
index 0000000..5a7d3e9
--- /dev/null
+++ b/src/2022/day14/README.md
@@ -0,0 +1,115 @@
+--- 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?
+
+
diff --git a/src/2022/day14/aoc.cpp b/src/2022/day14/aoc.cpp
new file mode 100644
index 0000000..a60f716
--- /dev/null
+++ b/src/2022/day14/aoc.cpp
@@ -0,0 +1,8 @@
+#include "aoc.h"
+
+namespace aoc2022 {
+std::pair<int, int> day14(line_view) {
+ return {0, 0};
+}
+}
+
diff --git a/src/2022/day14/aoc.h b/src/2022/day14/aoc.h
new file mode 100644
index 0000000..799651d
--- /dev/null
+++ b/src/2022/day14/aoc.h
@@ -0,0 +1,7 @@
+#include "common.h"
+#include <vector>
+
+namespace aoc2022 {
+std::pair<int, int> day14(line_view);
+}
+
diff --git a/src/2022/day14/input b/src/2022/day14/input
new file mode 100644
index 0000000..772cfbb
--- /dev/null
+++ b/src/2022/day14/input
@@ -0,0 +1,167 @@
+512,137 -> 522,137
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+530,159 -> 534,159
+472,109 -> 472,110 -> 488,110 -> 488,109
+481,88 -> 485,88
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+478,85 -> 482,85
+494,32 -> 498,32
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+488,32 -> 492,32
+494,28 -> 498,28
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+485,34 -> 489,34
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+491,26 -> 495,26
+484,85 -> 488,85
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+472,109 -> 472,110 -> 488,110 -> 488,109
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+491,34 -> 495,34
+498,121 -> 498,122 -> 509,122 -> 509,121
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+484,79 -> 488,79
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+475,88 -> 479,88
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+482,32 -> 486,32
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+472,91 -> 476,91
+488,28 -> 492,28
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+477,119 -> 482,119
+524,159 -> 528,159
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+497,34 -> 501,34
+481,82 -> 485,82
+498,121 -> 498,122 -> 509,122 -> 509,121
+490,115 -> 495,115
+487,82 -> 491,82
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+518,159 -> 522,159
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+503,34 -> 507,34
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+493,88 -> 497,88
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+527,156 -> 531,156
+498,119 -> 503,119
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+500,32 -> 504,32
+487,88 -> 491,88
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+491,119 -> 496,119
+479,34 -> 483,34
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+487,117 -> 492,117
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+496,91 -> 500,91
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+487,75 -> 487,76 -> 499,76 -> 499,75
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+484,91 -> 488,91
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+490,91 -> 494,91
+490,85 -> 494,85
+485,30 -> 489,30
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+483,115 -> 488,115
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+484,119 -> 489,119
+524,153 -> 528,153
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+491,30 -> 495,30
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+521,156 -> 525,156
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+486,113 -> 491,113
+497,30 -> 501,30
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+514,162 -> 514,165 -> 513,165 -> 513,171 -> 526,171 -> 526,165 -> 519,165 -> 519,162
+519,150 -> 519,140 -> 519,150 -> 521,150 -> 521,140 -> 521,150 -> 523,150 -> 523,141 -> 523,150 -> 525,150 -> 525,142 -> 525,150
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+507,125 -> 507,127 -> 505,127 -> 505,134 -> 514,134 -> 514,127 -> 513,127 -> 513,125
+494,117 -> 499,117
+478,91 -> 482,91
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+472,109 -> 472,110 -> 488,110 -> 488,109
+499,62 -> 499,66 -> 495,66 -> 495,70 -> 510,70 -> 510,66 -> 503,66 -> 503,62
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+487,75 -> 487,76 -> 499,76 -> 499,75
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+468,47 -> 468,37 -> 468,47 -> 470,47 -> 470,37 -> 470,47 -> 472,47 -> 472,41 -> 472,47 -> 474,47 -> 474,39 -> 474,47 -> 476,47 -> 476,44 -> 476,47 -> 478,47 -> 478,45 -> 478,47 -> 480,47 -> 480,37 -> 480,47 -> 482,47 -> 482,40 -> 482,47 -> 484,47 -> 484,42 -> 484,47 -> 486,47 -> 486,38 -> 486,47
+480,117 -> 485,117
+494,23 -> 494,22 -> 494,23 -> 496,23 -> 496,17 -> 496,23 -> 498,23 -> 498,20 -> 498,23 -> 500,23 -> 500,14 -> 500,23 -> 502,23 -> 502,13 -> 502,23 -> 504,23 -> 504,15 -> 504,23
+498,121 -> 498,122 -> 509,122 -> 509,121
+487,75 -> 487,76 -> 499,76 -> 499,75
+507,50 -> 507,53 -> 501,53 -> 501,59 -> 516,59 -> 516,53 -> 511,53 -> 511,50
+462,104 -> 462,99 -> 462,104 -> 464,104 -> 464,98 -> 464,104 -> 466,104 -> 466,102 -> 466,104 -> 468,104 -> 468,97 -> 468,104 -> 470,104 -> 470,96 -> 470,104 -> 472,104 -> 472,99 -> 472,104 -> 474,104 -> 474,100 -> 474,104 -> 476,104 -> 476,96 -> 476,104 -> 478,104 -> 478,97 -> 478,104
diff --git a/src/2022/day14/input0 b/src/2022/day14/input0
new file mode 100644
index 0000000..4e87bb5
--- /dev/null
+++ b/src/2022/day14/input0
@@ -0,0 +1,2 @@
+498,4 -> 498,6 -> 496,6
+503,4 -> 502,4 -> 502,9 -> 494,9
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index b3ad84f..37ad6e6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -98,6 +98,7 @@ set(SOLUTION_FILES
"2022/day11/aoc.cpp"
"2022/day12/aoc.cpp"
"2022/day13/aoc.cpp"
+ "2022/day14/aoc.cpp"
)
add_library(solution SHARED ${SOLUTION_FILES})
diff --git a/test/test_2022.cpp b/test/test_2022.cpp
index 0a15d0f..b793acd 100644
--- a/test/test_2022.cpp
+++ b/test/test_2022.cpp
@@ -11,6 +11,7 @@
#include "2022/day11/aoc.h"
#include "2022/day12/aoc.h"
#include "2022/day13/aoc.h"
+#include "2022/day14/aoc.h"
#include "catch.hpp"
#include <stdio.h>
#include <string.h>
@@ -104,6 +105,13 @@ TEST_CASE("Hill Climbing Algorithm", "[2022]") {
TEST_CASE("Distress Signal", "[2022]") {
line_view lv = load_file("../src/2022/day13/input");
auto p = aoc2022::day13(lv);
+ REQUIRE(5003 == p.first);
+ // REQUIRE(0 == p.second);
+}
+
+TEST_CASE("Regolith Reservoir", "[2022]") {
+ line_view lv = load_file("../src/2022/day14/input");
+ auto p = aoc2022::day14(lv);
REQUIRE(0 == p.first);
REQUIRE(0 == p.second);
}