From 72ae9ccb77d2f17357fabb9148fdc165dfb7ab34 Mon Sep 17 00:00:00 2001 From: Tom Weber Date: Fri, 16 Dec 2022 18:48:19 +0100 Subject: [PATCH] day14, remember that sets are much faster than lists. --- python/day14/bsp.txt | 2 + python/day14/day14_1.py | 54 ++++++++++++++++ python/day14/day14_2.py | 53 +++++++++++++++ python/day14/input.txt | 138 ++++++++++++++++++++++++++++++++++++++++ 4 files changed, 247 insertions(+) create mode 100644 python/day14/bsp.txt create mode 100644 python/day14/day14_1.py create mode 100644 python/day14/day14_2.py create mode 100644 python/day14/input.txt diff --git a/python/day14/bsp.txt b/python/day14/bsp.txt new file mode 100644 index 0000000..1926028 --- /dev/null +++ b/python/day14/bsp.txt @@ -0,0 +1,2 @@ +498,4 -> 498,6 -> 496,6 +503,4 -> 502,4 -> 502,9 -> 494,9 \ No newline at end of file diff --git a/python/day14/day14_1.py b/python/day14/day14_1.py new file mode 100644 index 0000000..afc6eb5 --- /dev/null +++ b/python/day14/day14_1.py @@ -0,0 +1,54 @@ +lines = open("input.txt", "r").read().splitlines() + +sand_source = (500, 0) + + +def parse_rocks(lines: list) -> list: + paths = [] + for line in lines: + path = [int(c) for coord in line.split(" -> ") for c in coord.split(",")] + paths.append(path) + rocks = [] + for path in paths: + for i in range(0, len(path) - 2, 2): + x1, y1 = path[i], path[i + 1] + x2, y2 = path[i + 2], path[i + 3] + xrange = range(min(x1, x2), max(x1, x2) + 1) + yrange = range(min(y1, y2), max(y1, y2) + 1) + coords = [(x, y) for x in xrange for y in yrange] + rocks = rocks + list(coords) + return list(set(rocks)) + + +def drop_new_sand(sand, rocks, max_y): + x, y = sand_source + while True: + if y > max_y: + return sand, False + if (x, y + 1) not in rocks and (x, y + 1) not in sand: + y += 1 + elif (x - 1, y + 1) not in rocks and (x - 1, y + 1) not in sand: + x -= 1 + y += 1 + elif (x + 1, y + 1) not in rocks and (x + 1, y + 1) not in sand: + x += 1 + y += 1 + else: + sand.append((x, y)) + break + return sand, True + + +def get_max_y(rocks): + max_y = sorted(rocks, key=lambda x: x[1])[-1][1] + return max_y + + +rocks = parse_rocks(lines) +max_y = get_max_y(rocks) +room_for_sand = True +sand = [] +while room_for_sand: + sand, room_for_sand = drop_new_sand(sand, rocks, max_y) + +print(len(sand)) diff --git a/python/day14/day14_2.py b/python/day14/day14_2.py new file mode 100644 index 0000000..418a9c9 --- /dev/null +++ b/python/day14/day14_2.py @@ -0,0 +1,53 @@ +lines = open("input.txt", "r").read().splitlines() + +sand_source = (500, 0) + + +def parse_rocks(lines: list) -> list: + paths = [] + for line in lines: + path = [int(c) for coord in line.split(" -> ") for c in coord.split(",")] + paths.append(path) + rocks = set() + for path in paths: + for i in range(0, len(path) - 2, 2): + x1, y1 = path[i], path[i + 1] + x2, y2 = path[i + 2], path[i + 3] + xrange = range(min(x1, x2), max(x1, x2) + 1) + yrange = range(min(y1, y2), max(y1, y2) + 1) + coords = [(x, y) for x in xrange for y in yrange] + rocks.update(coords) + return rocks + + +def drop_sand(rocks, max_y): + x, y = sand_source + while True: + if (x, y) in rocks: + x, y = sand_source + if (x, y + 1) not in rocks and y < max_y + 1: + y += 1 + elif (x - 1, y + 1) not in rocks and y < max_y + 1: + x -= 1 + y += 1 + elif (x + 1, y + 1) not in rocks and y < max_y + 1: + x += 1 + y += 1 + else: + rocks.add((x, y)) + print(len(rocks) - onlyrocks) + if (x, y) == sand_source: + break + return rocks + + +def get_max_y(rocks): + max_y = sorted(rocks, key=lambda x: x[1])[-1][1] + return max_y + + +rocks = parse_rocks(lines) +onlyrocks = len(rocks) +max_y = get_max_y(rocks) +rocksandsand = drop_sand(rocks, max_y) +print(len(rocksandsand) - onlyrocks) diff --git a/python/day14/input.txt b/python/day14/input.txt new file mode 100644 index 0000000..8b96008 --- /dev/null +++ b/python/day14/input.txt @@ -0,0 +1,138 @@ +508,146 -> 513,146 +514,142 -> 519,142 +483,88 -> 487,88 +522,146 -> 527,146 +492,90 -> 496,90 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +486,86 -> 490,86 +489,84 -> 493,84 +507,79 -> 511,79 +486,90 -> 490,90 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +494,26 -> 494,27 -> 505,27 +485,113 -> 489,113 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +515,53 -> 515,54 -> 524,54 +498,76 -> 502,76 +515,53 -> 515,54 -> 524,54 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +495,88 -> 499,88 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +497,103 -> 497,104 -> 513,104 -> 513,103 +505,31 -> 513,31 -> 513,30 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +497,109 -> 501,109 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +501,79 -> 505,79 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +510,76 -> 514,76 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +513,79 -> 517,79 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +491,109 -> 495,109 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +492,82 -> 496,82 +515,146 -> 520,146 +498,90 -> 502,90 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +498,86 -> 502,86 +491,113 -> 495,113 +512,148 -> 517,148 +511,144 -> 516,144 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +503,113 -> 507,113 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +505,148 -> 510,148 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +501,88 -> 505,88 +504,70 -> 508,70 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +489,88 -> 493,88 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +494,107 -> 498,107 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +495,79 -> 499,79 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +501,73 -> 505,73 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +494,111 -> 498,111 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +497,113 -> 501,113 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +507,73 -> 511,73 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +526,148 -> 531,148 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +488,111 -> 492,111 +508,93 -> 508,97 -> 507,97 -> 507,101 -> 517,101 -> 517,97 -> 510,97 -> 510,93 +497,103 -> 497,104 -> 513,104 -> 513,103 +497,103 -> 497,104 -> 513,104 -> 513,103 +497,23 -> 497,15 -> 497,23 -> 499,23 -> 499,21 -> 499,23 -> 501,23 -> 501,15 -> 501,23 +519,148 -> 524,148 +505,31 -> 513,31 -> 513,30 +495,84 -> 499,84 +480,90 -> 484,90 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +518,144 -> 523,144 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +494,26 -> 494,27 -> 505,27 +503,34 -> 503,37 -> 495,37 -> 495,40 -> 512,40 -> 512,37 -> 505,37 -> 505,34 +500,111 -> 504,111 +504,76 -> 508,76 +517,116 -> 517,119 -> 516,119 -> 516,126 -> 527,126 -> 527,119 -> 520,119 -> 520,116 +512,139 -> 512,132 -> 512,139 -> 514,139 -> 514,136 -> 514,139 -> 516,139 -> 516,135 -> 516,139 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +504,90 -> 508,90 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +511,43 -> 511,46 -> 510,46 -> 510,50 -> 516,50 -> 516,46 -> 515,46 -> 515,43 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +507,67 -> 507,63 -> 507,67 -> 509,67 -> 509,61 -> 509,67 -> 511,67 -> 511,66 -> 511,67 -> 513,67 -> 513,60 -> 513,67 -> 515,67 -> 515,62 -> 515,67 -> 517,67 -> 517,62 -> 517,67 -> 519,67 -> 519,59 -> 519,67 +525,161 -> 525,156 -> 525,161 -> 527,161 -> 527,156 -> 527,161 -> 529,161 -> 529,154 -> 529,161 -> 531,161 -> 531,154 -> 531,161 -> 533,161 -> 533,157 -> 533,161 -> 535,161 -> 535,152 -> 535,161 -> 537,161 -> 537,160 -> 537,161 +492,86 -> 496,86