diff --git a/2022/d10/data/example.txt b/2022/d10/data/example.txt index a612424..37ee8ee 100644 --- a/2022/d10/data/example.txt +++ b/2022/d10/data/example.txt @@ -1,14 +1,146 @@ -Sensor at x=2, y=18: closest beacon is at x=-2, y=15 -Sensor at x=9, y=16: closest beacon is at x=10, y=16 -Sensor at x=13, y=2: closest beacon is at x=15, y=3 -Sensor at x=12, y=14: closest beacon is at x=10, y=16 -Sensor at x=10, y=20: closest beacon is at x=10, y=16 -Sensor at x=14, y=17: closest beacon is at x=10, y=16 -Sensor at x=8, y=7: closest beacon is at x=2, y=10 -Sensor at x=2, y=0: closest beacon is at x=2, y=10 -Sensor at x=0, y=11: closest beacon is at x=2, y=10 -Sensor at x=20, y=14: closest beacon is at x=25, y=17 -Sensor at x=17, y=20: closest beacon is at x=21, y=22 -Sensor at x=16, y=7: closest beacon is at x=15, y=3 -Sensor at x=14, y=3: closest beacon is at x=15, y=3 -Sensor at x=20, y=1: closest beacon is at x=15, y=3 +addx 15 +addx -11 +addx 6 +addx -3 +addx 5 +addx -1 +addx -8 +addx 13 +addx 4 +noop +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx 5 +addx -1 +addx -35 +addx 1 +addx 24 +addx -19 +addx 1 +addx 16 +addx -11 +noop +noop +addx 21 +addx -15 +noop +noop +addx -3 +addx 9 +addx 1 +addx -3 +addx 8 +addx 1 +addx 5 +noop +noop +noop +noop +noop +addx -36 +noop +addx 1 +addx 7 +noop +noop +noop +addx 2 +addx 6 +noop +noop +noop +noop +noop +addx 1 +noop +noop +addx 7 +addx 1 +noop +addx -13 +addx 13 +addx 7 +noop +addx 1 +addx -33 +noop +noop +noop +addx 2 +noop +noop +noop +addx 8 +noop +addx -1 +addx 2 +addx 1 +noop +addx 17 +addx -9 +addx 1 +addx 1 +addx -3 +addx 11 +noop +noop +addx 1 +noop +addx 1 +noop +noop +addx -13 +addx -19 +addx 1 +addx 3 +addx 26 +addx -30 +addx 12 +addx -1 +addx 3 +addx 1 +noop +noop +noop +addx -9 +addx 18 +addx 1 +addx 2 +noop +noop +addx 9 +noop +noop +noop +addx -1 +addx 2 +addx -37 +addx 1 +addx 3 +noop +addx 15 +addx -21 +addx 22 +addx -6 +addx 1 +noop +addx 2 +addx 1 +noop +addx -10 +noop +noop +addx 20 +addx 1 +addx 2 +addx 2 +addx -6 +addx -11 +noop +noop +noop diff --git a/2022/d10/data/submission.txt b/2022/d10/data/submission.txt index 1999197..1832939 100644 --- a/2022/d10/data/submission.txt +++ b/2022/d10/data/submission.txt @@ -1,34 +1,143 @@ -Sensor at x=3842919, y=126080: closest beacon is at x=3943893, y=1918172 -Sensor at x=406527, y=2094318: closest beacon is at x=-1066, y=1333278 -Sensor at x=2208821, y=3683408: closest beacon is at x=2914373, y=3062268 -Sensor at x=39441, y=1251806: closest beacon is at x=-1066, y=1333278 -Sensor at x=3093352, y=2404566: closest beacon is at x=2810772, y=2699609 -Sensor at x=3645473, y=2234498: closest beacon is at x=3943893, y=1918172 -Sensor at x=3645012, y=2995540: closest beacon is at x=4001806, y=2787325 -Sensor at x=18039, y=3083937: closest beacon is at x=103421, y=3007511 -Sensor at x=2375680, y=551123: closest beacon is at x=2761373, y=2000000 -Sensor at x=776553, y=123250: closest beacon is at x=-1066, y=1333278 -Sensor at x=2884996, y=2022644: closest beacon is at x=2761373, y=2000000 -Sensor at x=1886537, y=2659379: closest beacon is at x=2810772, y=2699609 -Sensor at x=3980015, y=3987237: closest beacon is at x=3844688, y=3570059 -Sensor at x=3426483, y=3353349: closest beacon is at x=3844688, y=3570059 -Sensor at x=999596, y=1165648: closest beacon is at x=-1066, y=1333278 -Sensor at x=2518209, y=2287271: closest beacon is at x=2761373, y=2000000 -Sensor at x=3982110, y=3262128: closest beacon is at x=3844688, y=3570059 -Sensor at x=3412896, y=3999288: closest beacon is at x=3844688, y=3570059 -Sensor at x=2716180, y=2798731: closest beacon is at x=2810772, y=2699609 -Sensor at x=3575486, y=1273265: closest beacon is at x=3943893, y=1918172 -Sensor at x=7606, y=2926795: closest beacon is at x=103421, y=3007511 -Sensor at x=2719370, y=2062251: closest beacon is at x=2761373, y=2000000 -Sensor at x=1603268, y=1771299: closest beacon is at x=2761373, y=2000000 -Sensor at x=3999678, y=1864727: closest beacon is at x=3943893, y=1918172 -Sensor at x=3157947, y=2833781: closest beacon is at x=2914373, y=3062268 -Sensor at x=3904662, y=2601010: closest beacon is at x=4001806, y=2787325 -Sensor at x=3846359, y=1608423: closest beacon is at x=3943893, y=1918172 -Sensor at x=2831842, y=3562642: closest beacon is at x=2914373, y=3062268 -Sensor at x=3157592, y=1874755: closest beacon is at x=2761373, y=2000000 -Sensor at x=934300, y=2824967: closest beacon is at x=103421, y=3007511 -Sensor at x=3986911, y=1907590: closest beacon is at x=3943893, y=1918172 -Sensor at x=200888, y=3579976: closest beacon is at x=103421, y=3007511 -Sensor at x=967209, y=3837958: closest beacon is at x=103421, y=3007511 -Sensor at x=3998480, y=1972726: closest beacon is at x=3943893, y=1918172 +noop +noop +addx 5 +noop +noop +addx 6 +addx 4 +addx -4 +addx 4 +addx -6 +addx 11 +addx -1 +addx 2 +addx 4 +addx 3 +noop +addx 2 +addx -30 +addx 2 +addx 33 +noop +addx -37 +noop +noop +noop +addx 3 +addx 2 +addx 5 +addx 20 +addx 7 +addx -24 +addx 2 +noop +addx 7 +addx -2 +addx -6 +addx 13 +addx 3 +addx -2 +addx 2 +noop +addx -5 +addx 10 +addx 5 +addx -39 +addx 1 +addx 5 +noop +addx 3 +noop +addx -5 +addx 10 +addx -2 +addx 2 +noop +noop +addx 7 +noop +noop +noop +noop +addx 3 +noop +addx 3 +addx 2 +addx 8 +addx -1 +addx -20 +addx 21 +addx -38 +addx 5 +addx 2 +noop +noop +noop +addx 8 +noop +noop +addx -2 +addx 2 +addx -7 +addx 14 +addx 5 +noop +noop +noop +addx -16 +addx 17 +addx 2 +addx -12 +addx 19 +noop +noop +addx -37 +noop +noop +noop +addx 3 +addx 2 +addx 2 +addx 5 +addx 20 +addx -19 +addx 2 +noop +noop +noop +addx 5 +addx 19 +addx -12 +addx 3 +addx -2 +addx 2 +addx -18 +addx 25 +addx -14 +addx -22 +addx 1 +noop +noop +noop +addx 3 +addx 5 +addx -4 +addx 7 +addx 4 +noop +addx 1 +noop +noop +addx 2 +addx -6 +addx 15 +addx -1 +addx 4 +noop +noop +addx 1 +addx 4 +addx -33 +noop +addx 21 +noop diff --git a/2022/d10/src/main.py b/2022/d10/src/main.py index b25c4b2..b8b7f8a 100644 --- a/2022/d10/src/main.py +++ b/2022/d10/src/main.py @@ -1,138 +1,45 @@ #!/usr/bin/env python3 import sys -from typing import Iterable, Optional -from dataclasses import dataclass +from typing import Iterable import os -import string -from functools import reduce -@dataclass -class RectBound: - bot_left: tuple[int, int] - top_right: tuple[int, int] - -@dataclass -class Sensor: - loc: tuple[int, int] - radius_1k: int - nearest_beacon: tuple[int, int] - _rect_bound: Optional[RectBound] = None # inclusive - - def rect_bound(self): - if not self._rect_bound: - self._rect_bound = RectBound(\ - (self.loc[0]-self.radius_1k, self.loc[1]-self.radius_1k), - (self.loc[0]+self.radius_1k, self.loc[1]+self.radius_1k), - ) - return self._rect_bound - -def vec2d_str(x: str, y: str): - return (int(x), int(y)) - -def vec_diff(lhs: Iterable[int], rhs: Iterable[int]): - return tuple(l - r for l, r in zip(lhs, rhs)) - -def norm_1k(vec: Iterable[int]): - return sum(abs(e) for e in vec) - -@dataclass -class SolutionBound: - min_x: int - min_y: int - max_x: int - max_y: int - -def solution_bound(sensors: list[Sensor]): - return SolutionBound(min(sensor.loc[0] - sensor.radius_1k for sensor in sensors), - min(sensor.loc[1] - sensor.radius_1k for sensor in sensors), - max(sensor.loc[0] + sensor.radius_1k for sensor in sensors), - max(sensor.loc[1] + sensor.radius_1k for sensor in sensors), - ) - -def which_sensor(loc: tuple[int, int], sensors: list[Sensor]): - """ - Arbitrary sensor number, not nearest or anything. - Actually, this fancies the lower index - """ - for i, sensor in enumerate(sensors): - if norm_1k(vec_diff(sensor.loc, loc)) <= sensor.radius_1k: - return (i, sensor if sensor.loc == loc else None) - return None - -def beacons_set(sensors: list[Sensor]): - return set(sensor.nearest_beacon for sensor in sensors) - -def gen_graph(sensors: list[Sensor], sol_bound: Optional[SolutionBound] = None): - sol_bound = sol_bound if sol_bound is not None else solution_bound(sensors) - beacons = beacons_set(sensors) - return [[which_sensor((x, y), sensors) if (x, y) not in beacons else 'B' - for x in range(sol_bound.min_x, sol_bound.max_x + 1)] - for y in range(sol_bound.min_y, sol_bound.max_y + 1)] - -def render_graph(graph: list[list[None | tuple[int, Optional[Sensor]] | str]]): - def sensor_display(x: None | tuple[int, Optional[Sensor]] | str): - match x: - case (int(v), s): - sensor = ("0123456789"+string.ascii_lowercase) - signal = (")!@#$%^&*("+string.ascii_uppercase) - return (signal if s is not None else sensor)[v] - case None: - return '.' - case str(s): - return s +def part1(insns: list[list[str]], init = 1): + reg = init + regs = [reg] + for insn in insns: + match insn: + case ["noop"]: + regs.append(regs[-1]) + case ["addx", adder]: + reg += int(adder) + regs.append(regs[-1]) + regs.append(reg) case e: - raise RuntimeError(f"Unexpected {e}") + raise RuntimeError(f"lol what case is this? {e=}") + print("regs", os.pathsep.join(str(reg) for reg in regs)) - return list(" ".join(sensor_display(e) if e else '.' for e in row) for row in graph) + def ret(queries: Iterable[int]): + signal_bases = [(i, regs[i-1]) for i in queries] + print(signal_bases) + return sum(signal[0] * signal[1] for signal in signal_bases) + return (regs, ret) -def sensor_range_at(sensor: Sensor, y: int): - effective_radius = max(sensor.radius_1k - abs(y - sensor.loc[1]), 0) - if effective_radius == 0 and sensor.loc[1] != y: - return iter([]) - return range(sensor.loc[0] - effective_radius, sensor.loc[0] + effective_radius + 1) - -def index_render_graph(rendered_graph: list[str], sol: SolutionBound): - return os.linesep.join(f"{str(i + sol.min_y).zfill(3)} {row}" - for i, row in enumerate(rendered_graph)) - -def part1(sensors: list[Sensor], y:int): - sol = solution_bound(sensors) - print(sol) - # rendered_graph = render_graph(gen_graph(sensors, sol)) - # print(index_render_graph(rendered_graph, sol)) - beacons = beacons_set(sensors) - ranges = list(set(sensor_range_at(sensor, y)) - for sensor in sensors) - print("ranges", ranges) - x_sense = reduce(lambda lhs, rhs: lhs.union(rhs), ranges).difference({beacon[0] for beacon in beacons if beacon[1] == y}) - # return sum((x, y) not in beacons and which_sensor((x, y), sensors) is not None - # for x in range(sol.min_x, sol.max_x + 1)) - print("x_sense", x_sense) - return len(x_sense) - -def part2(sensors: list[Sensor], y:int): - pass - - -def sensor_from_input_line(line: str): - # print(line) - spl = line.split("=") - # print(spl) - _, sensor_x, sensor_y, beacon_x, beacon_y =spl - digit_only = lambda x: "".join(filter(lambda v: isinstance(v, str) and v in "0123456789-", x)) - sensor_loc = vec2d_str(digit_only(sensor_x), digit_only(sensor_y)) - beacon_loc = vec2d_str(digit_only(beacon_x), beacon_y) - return Sensor(sensor_loc, norm_1k(vec_diff(beacon_loc, sensor_loc)), beacon_loc) +def part2(insns: list[list[str]], init = 1, width = 40): + regs, _ = part1(insns, init) + position = lambda cycle: (cycle) % width + active = [['#' if (position(cycle) in range(regs[cycle]-1, regs[cycle]+2)) else '.' + for cycle in range(row, min(row + width, len(regs)))] + for row in range(0, len(regs),width)] + return active def main(lines: Iterable[str]): - sensors = list(sensor_from_input_line(stripped_line) - for stripped_line in (line.strip() for line in lines) if len(stripped_line) > 0) - beacons = beacons_set(sensors) - print(os.linesep.join(repr(sensor) for sensor in sensors)) - print("beacons:", beacons) - y1, y2 = 10, 2000000 - print("part1", part1(sensors, y1), part1(sensors, y2)) - # print("part2", part2(sensors, y1), part2(sensors, y2)) + instructions = [s.split() for s in (line.strip() for line in lines) if len(s) > 0] + # print("part1", part1(instructions)([1,2,3,4,5])) + print("part1", part1(instructions)[1]([20, 60, 100, 140, 180, 220])) + part2_ans = part2(instructions) + print("part2") + for line in part2_ans: + print(str().join(line)) pass @@ -147,5 +54,12 @@ if __name__=="__main__": REPL = """ _main("./data/example.txt") _main("./data/submission.txt") +main([ + "noop", + "addx 3", + "addx -5" +]) + +[1, 1, 1, 4, 4, -1, -1, -6, -6] """ diff --git a/2022/d14/data/example.txt b/2022/d14/data/example.txt index 9874df2..5794cac 100644 --- a/2022/d14/data/example.txt +++ b/2022/d14/data/example.txt @@ -1,8 +1,3 @@ -R 4 -U 4 -L 3 -D 1 -R 4 -D 1 -L 5 -R 2 +498,4 -> 498,6 -> 496,6 +503,4 -> 502,4 -> 502,9 -> 494,9 + diff --git a/2022/d14/data/submission.txt b/2022/d14/data/submission.txt index 81f0b8b..d2b34d7 100644 --- a/2022/d14/data/submission.txt +++ b/2022/d14/data/submission.txt @@ -1,2000 +1,160 @@ -U 1 -L 1 -U 2 -R 1 -U 2 -R 2 -L 1 -R 1 -L 1 -D 1 -L 2 -D 2 -U 1 -R 2 -D 1 -L 1 -D 2 -U 2 -R 2 -D 1 -R 1 -D 1 -U 2 -D 2 -U 1 -R 1 -L 1 -D 2 -R 2 -D 1 -R 1 -D 2 -L 1 -D 2 -R 1 -U 2 -R 1 -L 1 -U 2 -R 1 -L 2 -U 1 -R 2 -D 2 -R 2 -D 1 -L 2 -U 1 -R 1 -L 1 -U 2 -L 1 -U 2 -R 2 -D 1 -U 2 -D 1 -R 1 -D 2 -L 2 -U 2 -L 1 -R 1 -D 1 -U 2 -R 1 -L 2 -U 2 -L 2 -U 1 -L 1 -D 1 -U 2 -D 1 -R 1 -L 1 -D 1 -L 2 -D 2 -L 2 -R 1 -U 2 -L 2 -U 2 -D 2 -L 2 -D 2 -U 2 -R 2 -U 2 -R 1 -D 2 -R 2 -L 2 -D 1 -U 1 -L 2 -R 1 -U 1 -L 1 -D 2 -U 2 -D 2 -L 1 -R 1 -L 1 -U 1 -D 2 -U 1 -D 1 -R 2 -U 2 -R 2 -D 1 -U 1 -L 3 -D 3 -R 2 -L 2 -R 2 -L 2 -D 2 -L 3 -D 1 -L 3 -R 3 -L 3 -U 3 -D 3 -U 2 -L 2 -D 1 -U 2 -R 1 -D 1 -R 2 -L 2 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 11 -R 8 -D 14 -R 13 -U 8 -D 16 -L 5 -R 12 -U 9 -D 18 -L 10 -R 16 -L 18 -D 7 -L 6 -U 6 -R 10 -L 9 -R 3 -D 16 -R 5 -D 5 -R 6 -D 15 -U 15 -L 14 -D 11 -R 12 -D 7 -R 18 -D 10 -U 1 -D 1 -U 6 -D 7 -U 12 -D 3 -L 7 -U 15 -L 8 -R 11 -L 14 -D 5 -U 12 -R 8 -D 2 -U 7 -D 12 -L 15 -D 2 -U 14 -D 11 -U 2 -D 18 -R 16 -U 2 -D 1 -R 16 -D 15 -R 17 -D 13 -L 13 -U 10 -L 11 -U 6 -R 5 -D 14 -R 7 -L 5 -R 14 -D 15 -R 4 -L 9 -D 11 -L 4 -R 9 -U 12 -L 5 -D 10 -R 1 -D 5 -R 1 -L 16 -D 12 -L 8 -U 1 -D 9 -U 14 -L 3 -R 11 -D 4 -L 5 -R 17 -D 1 -L 12 -R 4 -L 15 -R 18 -U 7 -D 4 -R 3 -U 15 -R 10 -L 10 -U 16 -R 15 -L 12 -D 11 -R 13 -D 2 -R 12 -U 17 -R 14 -L 8 -U 1 -L 16 -D 11 -R 13 -D 19 -U 5 -D 19 -L 10 -R 18 -D 8 -R 1 -L 10 -D 6 -U 1 -L 14 -R 13 -L 14 -U 9 -D 6 -L 19 -U 18 -L 6 -R 13 -D 3 -U 8 -R 17 -U 14 -L 10 -R 1 -L 9 -R 3 -U 14 -R 6 -L 5 -D 8 -R 15 -L 12 -R 13 -U 4 -R 1 -L 10 -U 11 -L 3 -U 8 -R 16 -U 1 -D 3 -U 8 -L 1 -D 1 -L 9 -D 2 -U 5 -L 8 -R 1 -U 6 -L 1 -R 13 -U 10 -D 14 -U 2 -L 7 -R 9 -U 1 -R 2 -L 5 -U 17 -R 19 -L 18 -U 19 -D 18 -L 6 -R 15 -U 5 -R 17 -L 9 -U 3 -L 9 -U 10 -L 10 -R 5 -D 14 -U 14 -R 13 -U 16 -D 8 -L 1 -D 15 -R 10 -D 15 -U 9 -D 18 -L 8 -R 8 -L 3 -U 6 -L 12 -R 8 -D 15 -L 17 -U 11 -R 1 -D 2 -R 1 -U 1 -L 10 -D 11 -U 6 -L 10 -U 5 -R 14 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +507,19 -> 511,19 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +494,34 -> 499,34 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +490,31 -> 495,31 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +497,108 -> 501,108 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +482,25 -> 487,25 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +517,79 -> 522,79 +498,17 -> 502,17 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +479,28 -> 484,28 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +501,19 -> 505,19 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +501,15 -> 505,15 +511,60 -> 522,60 +509,108 -> 513,108 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +513,76 -> 518,76 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +497,31 -> 502,31 +501,34 -> 506,34 +503,134 -> 512,134 -> 512,133 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +500,99 -> 504,99 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +514,82 -> 519,82 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +495,15 -> 499,15 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +498,13 -> 502,13 +485,22 -> 490,22 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +511,85 -> 516,85 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +473,34 -> 478,34 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +483,31 -> 488,31 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +500,105 -> 504,105 +521,82 -> 526,82 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +503,102 -> 507,102 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +487,34 -> 492,34 +503,108 -> 507,108 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +489,25 -> 494,25 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +492,17 -> 496,17 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +495,19 -> 499,19 +504,85 -> 509,85 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +508,150 -> 521,150 +507,82 -> 512,82 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +480,34 -> 485,34 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +506,105 -> 510,105 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +503,134 -> 512,134 -> 512,133 +497,102 -> 501,102 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +489,19 -> 493,19 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +517,73 -> 517,69 -> 517,73 -> 519,73 -> 519,71 -> 519,73 -> 521,73 -> 521,72 -> 521,73 -> 523,73 -> 523,69 -> 523,73 -> 525,73 -> 525,69 -> 525,73 -> 527,73 -> 527,65 -> 527,73 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +486,28 -> 491,28 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +491,108 -> 495,108 +476,31 -> 481,31 +508,56 -> 508,49 -> 508,56 -> 510,56 -> 510,51 -> 510,56 -> 512,56 -> 512,49 -> 512,56 -> 514,56 -> 514,52 -> 514,56 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +525,85 -> 530,85 +510,163 -> 524,163 -> 524,162 +482,121 -> 482,120 -> 482,121 -> 484,121 -> 484,113 -> 484,121 -> 486,121 -> 486,115 -> 486,121 -> 488,121 -> 488,114 -> 488,121 -> 490,121 -> 490,120 -> 490,121 -> 492,121 -> 492,116 -> 492,121 -> 494,121 -> 494,112 -> 494,121 -> 496,121 -> 496,120 -> 496,121 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +504,17 -> 508,17 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +521,153 -> 521,155 -> 519,155 -> 519,158 -> 530,158 -> 530,155 -> 525,155 -> 525,153 +493,28 -> 498,28 +494,105 -> 498,105 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +495,124 -> 495,127 -> 489,127 -> 489,131 -> 503,131 -> 503,127 -> 500,127 -> 500,124 +507,88 -> 507,91 -> 503,91 -> 503,96 -> 519,96 -> 519,91 -> 513,91 -> 513,88 +510,79 -> 515,79 +510,163 -> 524,163 -> 524,162 +478,37 -> 478,39 -> 474,39 -> 474,43 -> 487,43 -> 487,39 -> 480,39 -> 480,37 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 +518,85 -> 523,85 +492,147 -> 492,138 -> 492,147 -> 494,147 -> 494,140 -> 494,147 -> 496,147 -> 496,138 -> 496,147 -> 498,147 -> 498,143 -> 498,147 -> 500,147 -> 500,137 -> 500,147 -> 502,147 -> 502,137 -> 502,147 -> 504,147 -> 504,146 -> 504,147 -> 506,147 -> 506,145 -> 506,147 -> 508,147 -> 508,138 -> 508,147 -> 510,147 -> 510,143 -> 510,147 + diff --git a/2022/d15/.envrc b/2022/d15/.envrc new file mode 100644 index 0000000..8ba04f9 --- /dev/null +++ b/2022/d15/.envrc @@ -0,0 +1,4 @@ +if command -v nix-shell &> /dev/null + then + use flake +fi diff --git a/2022/d15/.gitignore b/2022/d15/.gitignore new file mode 100644 index 0000000..bd32e74 --- /dev/null +++ b/2022/d15/.gitignore @@ -0,0 +1,2 @@ +.direnv +target diff --git a/2022/d15/Cargo.lock b/2022/d15/Cargo.lock new file mode 100644 index 0000000..0235225 --- /dev/null +++ b/2022/d15/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "d9" +version = "0.1.0" diff --git a/2022/d15/Cargo.toml b/2022/d15/Cargo.toml new file mode 100644 index 0000000..20ff77d --- /dev/null +++ b/2022/d15/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "d9" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/2022/d15/README.md b/2022/d15/README.md new file mode 100644 index 0000000..6c5483e --- /dev/null +++ b/2022/d15/README.md @@ -0,0 +1 @@ +# Bootstrapping clojure project on diff --git a/2022/d15/aoc/Cargo.lock b/2022/d15/aoc/Cargo.lock new file mode 100644 index 0000000..a5b53ef --- /dev/null +++ b/2022/d15/aoc/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "aoc" +version = "0.1.0" diff --git a/2022/d15/aoc/Cargo.toml b/2022/d15/aoc/Cargo.toml new file mode 100644 index 0000000..706d2e1 --- /dev/null +++ b/2022/d15/aoc/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "aoc" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/2022/d15/aoc/src/main.rs b/2022/d15/aoc/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/2022/d15/aoc/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} diff --git a/2022/d15/data/example.txt b/2022/d15/data/example.txt new file mode 100644 index 0000000..a612424 --- /dev/null +++ b/2022/d15/data/example.txt @@ -0,0 +1,14 @@ +Sensor at x=2, y=18: closest beacon is at x=-2, y=15 +Sensor at x=9, y=16: closest beacon is at x=10, y=16 +Sensor at x=13, y=2: closest beacon is at x=15, y=3 +Sensor at x=12, y=14: closest beacon is at x=10, y=16 +Sensor at x=10, y=20: closest beacon is at x=10, y=16 +Sensor at x=14, y=17: closest beacon is at x=10, y=16 +Sensor at x=8, y=7: closest beacon is at x=2, y=10 +Sensor at x=2, y=0: closest beacon is at x=2, y=10 +Sensor at x=0, y=11: closest beacon is at x=2, y=10 +Sensor at x=20, y=14: closest beacon is at x=25, y=17 +Sensor at x=17, y=20: closest beacon is at x=21, y=22 +Sensor at x=16, y=7: closest beacon is at x=15, y=3 +Sensor at x=14, y=3: closest beacon is at x=15, y=3 +Sensor at x=20, y=1: closest beacon is at x=15, y=3 diff --git a/2022/d15/data/submission.txt b/2022/d15/data/submission.txt new file mode 100644 index 0000000..1999197 --- /dev/null +++ b/2022/d15/data/submission.txt @@ -0,0 +1,34 @@ +Sensor at x=3842919, y=126080: closest beacon is at x=3943893, y=1918172 +Sensor at x=406527, y=2094318: closest beacon is at x=-1066, y=1333278 +Sensor at x=2208821, y=3683408: closest beacon is at x=2914373, y=3062268 +Sensor at x=39441, y=1251806: closest beacon is at x=-1066, y=1333278 +Sensor at x=3093352, y=2404566: closest beacon is at x=2810772, y=2699609 +Sensor at x=3645473, y=2234498: closest beacon is at x=3943893, y=1918172 +Sensor at x=3645012, y=2995540: closest beacon is at x=4001806, y=2787325 +Sensor at x=18039, y=3083937: closest beacon is at x=103421, y=3007511 +Sensor at x=2375680, y=551123: closest beacon is at x=2761373, y=2000000 +Sensor at x=776553, y=123250: closest beacon is at x=-1066, y=1333278 +Sensor at x=2884996, y=2022644: closest beacon is at x=2761373, y=2000000 +Sensor at x=1886537, y=2659379: closest beacon is at x=2810772, y=2699609 +Sensor at x=3980015, y=3987237: closest beacon is at x=3844688, y=3570059 +Sensor at x=3426483, y=3353349: closest beacon is at x=3844688, y=3570059 +Sensor at x=999596, y=1165648: closest beacon is at x=-1066, y=1333278 +Sensor at x=2518209, y=2287271: closest beacon is at x=2761373, y=2000000 +Sensor at x=3982110, y=3262128: closest beacon is at x=3844688, y=3570059 +Sensor at x=3412896, y=3999288: closest beacon is at x=3844688, y=3570059 +Sensor at x=2716180, y=2798731: closest beacon is at x=2810772, y=2699609 +Sensor at x=3575486, y=1273265: closest beacon is at x=3943893, y=1918172 +Sensor at x=7606, y=2926795: closest beacon is at x=103421, y=3007511 +Sensor at x=2719370, y=2062251: closest beacon is at x=2761373, y=2000000 +Sensor at x=1603268, y=1771299: closest beacon is at x=2761373, y=2000000 +Sensor at x=3999678, y=1864727: closest beacon is at x=3943893, y=1918172 +Sensor at x=3157947, y=2833781: closest beacon is at x=2914373, y=3062268 +Sensor at x=3904662, y=2601010: closest beacon is at x=4001806, y=2787325 +Sensor at x=3846359, y=1608423: closest beacon is at x=3943893, y=1918172 +Sensor at x=2831842, y=3562642: closest beacon is at x=2914373, y=3062268 +Sensor at x=3157592, y=1874755: closest beacon is at x=2761373, y=2000000 +Sensor at x=934300, y=2824967: closest beacon is at x=103421, y=3007511 +Sensor at x=3986911, y=1907590: closest beacon is at x=3943893, y=1918172 +Sensor at x=200888, y=3579976: closest beacon is at x=103421, y=3007511 +Sensor at x=967209, y=3837958: closest beacon is at x=103421, y=3007511 +Sensor at x=3998480, y=1972726: closest beacon is at x=3943893, y=1918172 diff --git a/2022/d15/flake.lock b/2022/d15/flake.lock new file mode 100644 index 0000000..5724db4 --- /dev/null +++ b/2022/d15/flake.lock @@ -0,0 +1,94 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1670064435, + "narHash": "sha256-+ELoY30UN+Pl3Yn7RWRPabykwebsVK/kYE9JsIsUMxQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "61a8a98e6d557e6dd7ed0cdb54c3a3e3bbc5e25c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1665296151, + "narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1670552927, + "narHash": "sha256-lCE51eAGrAFS4k9W5aDGFpVtOAwQQ/rFMN80PCDh0vo=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "a0fdafd18c9cf599fde17fbaf07dbb20fa57eecb", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/2022/d15/flake.nix b/2022/d15/flake.nix new file mode 100644 index 0000000..746c419 --- /dev/null +++ b/2022/d15/flake.nix @@ -0,0 +1,77 @@ +{ + description = "D4 AOC with Lua!"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + rust-overlay.url = "github:oxalica/rust-overlay"; + }; + outputs = { nixpkgs, flake-utils, rust-overlay, ... } @ inputs: + flake-utils.lib.eachSystem flake-utils.lib.defaultSystems (sys: + let + overlays = [ rust-overlay.overlays.default ]; + pkgs = import nixpkgs { system = sys; overlays = overlays; }; + shellHookAfter = '' + echo "The input files should be placed under ./data/{submission,example}.txt" + echo "This problem shares one input between two parts" + ''; + py_pkgs = [ pkgs.python310 ]; + rs_pkgs = [ + pkgs.openssl + pkgs.pkg-config + + # Add rust-src, which rust-analyzer seems to rely upon + (pkgs.rust-bin.selectLatestNightlyWith + ( + toolchain: + toolchain.default.override { + extensions = [ "rust-src" ]; + } + )) + # rust devex + pkgs.bacon # kinda like nodemon + pkgs.rust-analyzer + ]; + in + { + # Jack of all trades + devShell = pkgs.mkShell + { + buildInputs = py_pkgs ++ rs_pkgs; + shellHook = '' + echo "> Default runtime. This contains both rust and python3 env" + echo "Run ./run-py.sh for Python's output and ./run-rs.sh for Rust's output" + '' + shellHookAfter; + }; + devShells = { + # nix develop ./#lua + # lua = pkgs.mkShell { + # nativeBuildInputs = lua_pkgs; + # shellHook = '' + # echo "> Lua runtime" + # echo "Run ./run-lua.sh to see the output of the solution" + # '' + shellHookAfter; + # }; + + # nix develop ./#fennel + + # nix develop ./#python + rust = pkgs.mkShell { + nativeBuildInputs = rs_pkgs; + shellHook = '' + echo "> Rust runtime" + echo "Run ./run-rs.sh to see output of the solution" + echo "For quick feedback loop: bacon check-all" + '' + shellHookAfter; + }; + python = pkgs.mkShell { + nativeBuildInputs = py_pkgs; + shellHook = '' + echo "> Python3 runtime" + echo "Run ./run-py.sh to see the output of the solution" + '' + shellHookAfter; + + }; + }; + } + ); +} diff --git a/2022/d15/run-py.sh b/2022/d15/run-py.sh new file mode 100755 index 0000000..6197377 --- /dev/null +++ b/2022/d15/run-py.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env sh +echo "example" +python3 ./src/main.py ./data/example.txt + +echo "submission" +python3 ./src/main.py ./data/submission.txt + diff --git a/2022/d15/src/main.py b/2022/d15/src/main.py new file mode 100644 index 0000000..b25c4b2 --- /dev/null +++ b/2022/d15/src/main.py @@ -0,0 +1,151 @@ +#!/usr/bin/env python3 +import sys +from typing import Iterable, Optional +from dataclasses import dataclass +import os +import string +from functools import reduce + +@dataclass +class RectBound: + bot_left: tuple[int, int] + top_right: tuple[int, int] + +@dataclass +class Sensor: + loc: tuple[int, int] + radius_1k: int + nearest_beacon: tuple[int, int] + _rect_bound: Optional[RectBound] = None # inclusive + + def rect_bound(self): + if not self._rect_bound: + self._rect_bound = RectBound(\ + (self.loc[0]-self.radius_1k, self.loc[1]-self.radius_1k), + (self.loc[0]+self.radius_1k, self.loc[1]+self.radius_1k), + ) + return self._rect_bound + +def vec2d_str(x: str, y: str): + return (int(x), int(y)) + +def vec_diff(lhs: Iterable[int], rhs: Iterable[int]): + return tuple(l - r for l, r in zip(lhs, rhs)) + +def norm_1k(vec: Iterable[int]): + return sum(abs(e) for e in vec) + +@dataclass +class SolutionBound: + min_x: int + min_y: int + max_x: int + max_y: int + +def solution_bound(sensors: list[Sensor]): + return SolutionBound(min(sensor.loc[0] - sensor.radius_1k for sensor in sensors), + min(sensor.loc[1] - sensor.radius_1k for sensor in sensors), + max(sensor.loc[0] + sensor.radius_1k for sensor in sensors), + max(sensor.loc[1] + sensor.radius_1k for sensor in sensors), + ) + +def which_sensor(loc: tuple[int, int], sensors: list[Sensor]): + """ + Arbitrary sensor number, not nearest or anything. + Actually, this fancies the lower index + """ + for i, sensor in enumerate(sensors): + if norm_1k(vec_diff(sensor.loc, loc)) <= sensor.radius_1k: + return (i, sensor if sensor.loc == loc else None) + return None + +def beacons_set(sensors: list[Sensor]): + return set(sensor.nearest_beacon for sensor in sensors) + +def gen_graph(sensors: list[Sensor], sol_bound: Optional[SolutionBound] = None): + sol_bound = sol_bound if sol_bound is not None else solution_bound(sensors) + beacons = beacons_set(sensors) + return [[which_sensor((x, y), sensors) if (x, y) not in beacons else 'B' + for x in range(sol_bound.min_x, sol_bound.max_x + 1)] + for y in range(sol_bound.min_y, sol_bound.max_y + 1)] + +def render_graph(graph: list[list[None | tuple[int, Optional[Sensor]] | str]]): + def sensor_display(x: None | tuple[int, Optional[Sensor]] | str): + match x: + case (int(v), s): + sensor = ("0123456789"+string.ascii_lowercase) + signal = (")!@#$%^&*("+string.ascii_uppercase) + return (signal if s is not None else sensor)[v] + case None: + return '.' + case str(s): + return s + case e: + raise RuntimeError(f"Unexpected {e}") + + return list(" ".join(sensor_display(e) if e else '.' for e in row) for row in graph) + +def sensor_range_at(sensor: Sensor, y: int): + effective_radius = max(sensor.radius_1k - abs(y - sensor.loc[1]), 0) + if effective_radius == 0 and sensor.loc[1] != y: + return iter([]) + return range(sensor.loc[0] - effective_radius, sensor.loc[0] + effective_radius + 1) + +def index_render_graph(rendered_graph: list[str], sol: SolutionBound): + return os.linesep.join(f"{str(i + sol.min_y).zfill(3)} {row}" + for i, row in enumerate(rendered_graph)) + +def part1(sensors: list[Sensor], y:int): + sol = solution_bound(sensors) + print(sol) + # rendered_graph = render_graph(gen_graph(sensors, sol)) + # print(index_render_graph(rendered_graph, sol)) + beacons = beacons_set(sensors) + ranges = list(set(sensor_range_at(sensor, y)) + for sensor in sensors) + print("ranges", ranges) + x_sense = reduce(lambda lhs, rhs: lhs.union(rhs), ranges).difference({beacon[0] for beacon in beacons if beacon[1] == y}) + # return sum((x, y) not in beacons and which_sensor((x, y), sensors) is not None + # for x in range(sol.min_x, sol.max_x + 1)) + print("x_sense", x_sense) + return len(x_sense) + +def part2(sensors: list[Sensor], y:int): + pass + + +def sensor_from_input_line(line: str): + # print(line) + spl = line.split("=") + # print(spl) + _, sensor_x, sensor_y, beacon_x, beacon_y =spl + digit_only = lambda x: "".join(filter(lambda v: isinstance(v, str) and v in "0123456789-", x)) + sensor_loc = vec2d_str(digit_only(sensor_x), digit_only(sensor_y)) + beacon_loc = vec2d_str(digit_only(beacon_x), beacon_y) + return Sensor(sensor_loc, norm_1k(vec_diff(beacon_loc, sensor_loc)), beacon_loc) + +def main(lines: Iterable[str]): + sensors = list(sensor_from_input_line(stripped_line) + for stripped_line in (line.strip() for line in lines) if len(stripped_line) > 0) + beacons = beacons_set(sensors) + print(os.linesep.join(repr(sensor) for sensor in sensors)) + print("beacons:", beacons) + y1, y2 = 10, 2000000 + print("part1", part1(sensors, y1), part1(sensors, y2)) + # print("part2", part2(sensors, y1), part2(sensors, y2)) + pass + + +def _main(filename: str): + with open(filename, "r") as f: + main(f) + +if __name__=="__main__": + _main(sys.argv[1]) + +# For neovim integrated repl which can evaluate per selection +REPL = """ +_main("./data/example.txt") +_main("./data/submission.txt") + +""" diff --git a/2022/d15/src/main.rs b/2022/d15/src/main.rs new file mode 100644 index 0000000..dfafdbc --- /dev/null +++ b/2022/d15/src/main.rs @@ -0,0 +1,6 @@ +fn main() { + // let test = include_str!("../data/example.txt"); + let sub = inlcude_str!("../data/submission.txt"); + let commands = sub.lines() + .map(|line| line.split(" ")) +} diff --git a/2022/d6/README.md b/2022/d6/README.md new file mode 100644 index 0000000..6c5483e --- /dev/null +++ b/2022/d6/README.md @@ -0,0 +1 @@ +# Bootstrapping clojure project on diff --git a/2022/d6/data/example.txt b/2022/d6/data/example.txt new file mode 100644 index 0000000..7980a82 --- /dev/null +++ b/2022/d6/data/example.txt @@ -0,0 +1 @@ +mjqjpqmgbljsphdztnvjfqwrcgsmlb diff --git a/2022/d6/data/submission.txt b/2022/d6/data/submission.txt new file mode 100644 index 0000000..29ee7b0 --- /dev/null +++ b/2022/d6/data/submission.txt @@ -0,0 +1,3 @@ +hrbbjllllspssblslvvrdrbbpbbmcccfppvbbwvbbmrmjrjrfrgfgbffgfqfqlltlwttscsncscchssrppffvwwvvpnnwwwpvwvhhnvhhbttvzzdlzdlzzwmmjhhznnjdnnnqddbtdbdbsdsmdsdrrdpdwpdppgcgqgcctftsfszslljbljbjwbwbnwnqqrnnztntmtrmmzwzdwzwgwwwjhjsjgjtjjhpjhhppqzqdqffrvrtvvsmmgwmgwgbbclltctptzpzhpzptzppcfpcfftflfzftztddzgzmmfsmsrmmsstttvbvmbvvsmsqmqlldjdtthwtwbwggrzzjrzrcctffsshqshhpthhlnhlhqhdqqrwrmmcttpfttzfzgzdgdzzwrrtsrrsnrnccrbbsssbpbjjvzzwlwtwjwsjwjggzqgzzrsszzjnzjzwjzzcrzczncnqqztzfzhfhvvtjvjdvjjmrjrppvzppczpczcggshghvhnhhsrsnsdszzdpzpzlpzzhwwmnwmwmcwwfnwfwjjcbcncllcsllqdqzzhqhmqmbbjvjjwwcjjpnpllzfzddtmtccqrcrtrwrpphpmpplslmltthnnvhhvrvbblhhrrdqqmbqqgtqggdgcdcvvsbsswvvpggbbtftlflglzlmlbbfhhrshswhshffhhdnnrfrvrmrnrprrmfmpmnpnfnggvvcncdcrczrzccpmmssrbbdjdtdrdwrrwhrrvrtvvszvvwvzzmhhjhhwlhlqlvlttzftztdtstftrfrdddmtmzzsqzqvvpdpdcpcncnrrtntznzrzgznztnznhhsqqnrqrhhlzhzthhfddrzdrrqmqggcmmllnjjvwwjccfjfqfcfzccwvcwvcvjcjtjtnnqsqmqrmrzrszrszzfwfggnmmcdmdjmmhwwgfwfnwnlwwcffsrffvnvbvnvwnwgnwnmmbzbmbpplmplpspzpmzpzdzgzrzrtrjrbbppwvwgwmggqwgghqqshhcwcqwcqcfcbbnsnrrtztzrtrvtvhthzhmmrqqrwqqsjqjcctgtwthhqmmnffmgmdgdlgljjhwjwggrqqfrqqjvqvhqqgsqsgsttmrrbprbppmjppslpsllvlfvlvrvhvtqmrjcdzwsbzfmgmwmwqwhztqrsdzhqjqvbjbntnbndflthljcczdmmhszfgsplrtlqnfzbrlqngwdqtfwcmrdjrsmdpmjmqwrbwfjzwnvqhfmlqtvvnlfzbfccwslqpbzzjccbvrzhghqwtvqgwrmsfzqnmnqqjsjtpcmngpqgllfsnpqtjjbqcdppnsmtwrslnrbqtwvnbctzvwfmgctscmzjbqqgqdwbpzmrdwgfcjzftzgmfcjhchbnmnqnrgtqngwrmncjvptqqdtjtgtpzzdrfsdgmwlwrjnqldbwrqjrhwcczlzvlhpgrnwzhbwjnpthggczfgtrjnzvnlfdfbwcnzfbwlwlmgnnjnpvhbhqgnzhqsnmvbcftsmrcgpvnnnmgnrvpbzlpwnbwpzmwpgqvbfgjwfrjqnvvgmqwwcfddqmdznmfhpjcfgptqdqwmplrglbwlmsqzjshrlhflcjvptgrcfhjfgqmlfzrtphpbvcqzwpcnwljjdlmqzhcctqshdngrgtlfsrfccdtlvmqcdgnpcvphdsrpzfzwclvsqcpzqlfvvqzggdhpfzdvhshglvfzfmcllrdfjfsjtngjgddcpqnlmrnplwtlvwdvzftltnsnspcdztgqhlhvvbnwvnmhscfnqbngpvprzfrjcmfpfzfftrlnwgllhnjndpjdrwcgqpcgcqngnbfzlvzvhnqdjthflmwvppmbdssddmgsbgrqnpjzrjpzdddqgsdlmwnhhpjbthclvqhgrsnrbqgtnsjhncnzbhrdgftvbptrqssvsqfpqnddhmgwcrfqndqjsqgffmhdvqhjrdlmrlcqctqccprwlbqgqrwmtfhwmfjfqzdqbsdsjbtsvfvgbsrvqwnqqqqthpsqgcfslsqtnjwtsrcdcctggdghrjwpbfccrtwgszwbrsjswmjmjbcqrsgbcfsdjzsbjnnssnddnnvwgftlrqvphnqcgjszscrlhhjnljlqcjqtqfwbmdmrgdlcqqwmbsmsdhpplvlfglqwspbfptlbzqjwhqmfvzvsvpjclcdzsbvntmhdqdvhghcmmflpjbglsghbswdshtsbdrgpsrsclrmfwwqbrgdjsqztgttqpwhnfhszlgbfpzhczsnwqflmshlgbrpmdzgpqwtsbssgfjbtrwbmztlwwfmsdgpgfgdjfdccwlfgztbcbqjvjtvslmddjplrswwcszspgplsrhrnwnmrrfbcgdmntcrlvnfqtwwcczsglrhtrfqnmhvgzjpmlplqvqhmnfgvzqcmzhqszgslvndqtqhvrbvbmclbcbjdswvcjrzgfdmdwnnlzlzqcffsrqdfmmpzfnmdsnqlpcrhzsdnsflblcjsfsgcnsspftjrlmdjsmfpqtmlgfvnlfnjscsgwzwvpjrvvclhsbqldlnmtglhbjfwlzmvrbvgtprfjbjhhnlqnbrswwlqtcgrjrltdrnfrjhrntllptlsbhqrwvdsfrlghtfcndznzjwcgmtdvffltgrdmljlqhdtmdvnfsfsrvdpmhlrrsttvqlwfptddwbpfrbclwwzmfpttmrmmqzjnbbnnfvzwmmcfshvrlbdbjzprftbqvdsghnnzwbjccpthdsvsdlgvphsgjdqjwsgmzqnqpqvgqjvwgjtzpmqqwnlwrwhqqjjclcbhjgpwhqdclwmqfmwbwmwwvcbhfznfhcfbprfcdqlbcttnvgnjwswcmpbrghtzgdbppbprffzjgvddzpwmdctrhnrfzdfhtmnfrsfdqvzcnrtncflhvldcndwqtvbggmwlzhchlcwtcbqcvlfhdwljgddwpvcfczvfqmphgtdsnsqwdpvvmwnwqjbrjwbdhhgtffphsdrvspsbgmfrmwmhnrgqdfppzgfpgmqjcsnglczgwhjthfhztzrlpgzjhcfrjpjvtjptptbvflftjtcfhmbwlhlbhvnjnbfmwjrgbvvhmdlncdgncgfjcnnpdljfcjsmsfscqpwsgcmlhhqmldsnjfrrqpghwncmgwgnjsdtvbhrbbnmpqjrrctqqnqzztmbqmdsgdvmmlwmbvprllzgntnmttrlzrttmjjlrwpwmtfznmwnsjmjhjdnsppfhcrjpzhjqzdtdbsjshfzzvrwvjbjbgtsfpgggbdztczwlhpmthfjdgsbrvlwmlrvgdrpjzccwmgpcnqqzmqdjqmwsrzwsmtmdjdhmjrwfwnzlmfnqtcgtslwtlnwhvmqntmglhntnsjlnmzfvfdztcfwmpchsrsdmqvqcwljzrmmssjvbmvvnmqlbsdwnrbmqctdtmfzlgfzpmjcnftgftvjpfbwwmzfdrrwjwcfwfcfmzbbnppgjrmbcvmvnjpdrzmvndvddtvshlnjjwgtsvnwtwnhcbfpnthpjlrhgrqccdgppjvdqjwqrfrrgnvhfwvjhnwhntnpmghphrtgqhwtbrqhqljfdjbgnlgmqqgfcqpqfhcpgspdbvlbfjvlrgmtjztwdzlrhqwwtcpdvsqgssjbjjgqlwbcctzzqvvmdzpfrmspmqhtzwgcfsslpnhpjfwqrrfbwbndrvhnnsjnlvlvqdsgwzjsrprhgtvsfbhbcpljdczbtdwzcnhzntrwcrjctmhtjfdlthznzmqblppzcqgpjhlzjrmcvpptfjjzltdhmvwphwlccscwrwfcqpqwwrzcmnltzdcfvtjrcvsqwtchrmdfzjmzjfhppjzbhglwqggzqqnspfmzrfwrqdqdrsdbsdhcgdqrrnjlwrqhfhpzjhrvjndqphndnnnbwhrjvqrrbvlhhbljjcwmfpvnhcszfshlsnczgtcfhjslbhzczdqdmdnvqdzhbmbpcnbntwgllfscrcwhfrgtfvftmwhbgfhjzjrbvvwc + + diff --git a/2022/d6/flake.nix b/2022/d6/flake.nix index 3faf300..6cf0299 100644 --- a/2022/d6/flake.nix +++ b/2022/d6/flake.nix @@ -3,8 +3,12 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; + clj-nix = { + url = "github:jlesquembre/clj-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { nixpkgs, flake-utils, ... } @ inputs: + outputs = { nixpkgs, flake-utils, clj-nix, ... } @ inputs: flake-utils.lib.eachSystem flake-utils.lib.defaultSystems (sys: let overlays = [ ]; @@ -13,19 +17,21 @@ echo "The input files should be placed under ./data/{submission,example}.txt" echo "This problem shares one input between two parts" ''; + clj_pkgs = import clj-nix { system = sys; }; py_pkgs = [ pkgs.python310 ]; - # lua_pkgs = [ (pkgs.lua.withPackages (luapkgs: [ luapkgs.busted luapkgs.luafilesystem ])) ]; - fennel_pkgs = [ (pkgs.lua.withPackages (luapkgs: [ luapkgs.fennel luapkgs.readline ])) ]; + clojure_pkgs = [ ]; + in { # Jack of all trades - devShell = pkgs.mkShell { - nativeBuildInputs = py_pkgs ++ fennel_pkgs; - shellHook = '' - echo "> Default runtime. This contains both fennel and python3 env" - echo "Run ./run-py.sh for Python's output and ./run-fnl.sh for Fennel's output" - '' + shellHookAfter; - }; + devShell = pkgs.mkShell + { + nativeBuildInputs = py_pkgs ++ fennel_pkgs; + shellHook = '' + echo "> Default runtime. This contains both fennel and python3 env" + echo "Run ./run-py.sh for Python's output and ./run-fnl.sh for Fennel's output" + '' + shellHookAfter; + }; devShells = { # nix develop ./#lua # lua = pkgs.mkShell { diff --git a/2022/d7/_build/log b/2022/d7/_build/log new file mode 100644 index 0000000..081d220 --- /dev/null +++ b/2022/d7/_build/log @@ -0,0 +1,2 @@ +# dune init project aoc_37_ocaml +# OCAMLPARAM: unset diff --git a/2022/d7/aoc_37_ocaml/aoc_37_ocaml.opam b/2022/d7/aoc_37_ocaml/aoc_37_ocaml.opam new file mode 100644 index 0000000..e69de29 diff --git a/2022/d7/aoc_37_ocaml/bin/dune b/2022/d7/aoc_37_ocaml/bin/dune new file mode 100644 index 0000000..b228593 --- /dev/null +++ b/2022/d7/aoc_37_ocaml/bin/dune @@ -0,0 +1,4 @@ +(executable + (public_name aoc_37_ocaml) + (name main) + (libraries aoc_37_ocaml)) diff --git a/2022/d7/aoc_37_ocaml/bin/main.ml b/2022/d7/aoc_37_ocaml/bin/main.ml new file mode 100644 index 0000000..7bf6048 --- /dev/null +++ b/2022/d7/aoc_37_ocaml/bin/main.ml @@ -0,0 +1 @@ +let () = print_endline "Hello, World!" diff --git a/2022/d7/aoc_37_ocaml/lib/dune b/2022/d7/aoc_37_ocaml/lib/dune new file mode 100644 index 0000000..eaddc57 --- /dev/null +++ b/2022/d7/aoc_37_ocaml/lib/dune @@ -0,0 +1,2 @@ +(library + (name aoc_37_ocaml)) diff --git a/2022/d7/aoc_37_ocaml/test/aoc_37_ocaml.ml b/2022/d7/aoc_37_ocaml/test/aoc_37_ocaml.ml new file mode 100644 index 0000000..e69de29 diff --git a/2022/d7/aoc_37_ocaml/test/dune b/2022/d7/aoc_37_ocaml/test/dune new file mode 100644 index 0000000..27587fe --- /dev/null +++ b/2022/d7/aoc_37_ocaml/test/dune @@ -0,0 +1,2 @@ +(test + (name aoc_37_ocaml)) diff --git a/2022/d7/src/d7_2.py b/2022/d7/src/d7_2.py index 451a9f0..da8efd7 100644 --- a/2022/d7/src/d7_2.py +++ b/2022/d7/src/d7_2.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 from typing import Iterable - def main(lines: Iterable[str]): ROOT_WD = [""] ROOT="/".join(ROOT_WD) @@ -39,5 +38,3 @@ if __name__ == "__main__": import sys with open(sys.argv[1], "r") as f: main(f) - -"/".join([""])