From 3fc0f94b1c5842635727387c9a7ddfe2d6a0bd28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sat, 9 Dec 2023 11:01:24 +0100 Subject: [PATCH] 2021 day 1-5. --- 2021/day1.py | 14 + 2021/day10.py | 13 + 2021/day11.py | 13 + 2021/day12.py | 13 + 2021/day13.py | 13 + 2021/day14.py | 13 + 2021/day15.py | 13 + 2021/day16.py | 13 + 2021/day17.py | 13 + 2021/day18.py | 13 + 2021/day19.py | 13 + 2021/day2.py | 40 + 2021/day20.py | 13 + 2021/day21.py | 13 + 2021/day22.py | 13 + 2021/day23.py | 13 + 2021/day24.py | 13 + 2021/day25.py | 13 + 2021/day3.py | 39 + 2021/day4.py | 40 + 2021/day5.py | 4 - 2021/day6.py | 13 + 2021/day7.py | 13 + 2021/day8.py | 13 + 2021/day9.py | 13 + 2021/inputs/day1.txt | 2000 +++++++++++++++++++++++++++++++++++++++++ 2021/inputs/day10.txt | 0 2021/inputs/day11.txt | 0 2021/inputs/day12.txt | 0 2021/inputs/day13.txt | 0 2021/inputs/day14.txt | 0 2021/inputs/day15.txt | 0 2021/inputs/day16.txt | 0 2021/inputs/day17.txt | 0 2021/inputs/day18.txt | 0 2021/inputs/day19.txt | 0 2021/inputs/day2.txt | 1000 +++++++++++++++++++++ 2021/inputs/day20.txt | 0 2021/inputs/day21.txt | 0 2021/inputs/day22.txt | 0 2021/inputs/day23.txt | 0 2021/inputs/day24.txt | 0 2021/inputs/day25.txt | 0 2021/inputs/day3.txt | 1000 +++++++++++++++++++++ 2021/inputs/day4.txt | 601 +++++++++++++ 2021/inputs/day6.txt | 0 2021/inputs/day7.txt | 0 2021/inputs/day8.txt | 0 2021/inputs/day9.txt | 0 2021/tests/day1.txt | 10 + 2021/tests/day10.txt | 0 2021/tests/day11.txt | 0 2021/tests/day12.txt | 0 2021/tests/day13.txt | 0 2021/tests/day14.txt | 0 2021/tests/day15.txt | 0 2021/tests/day16.txt | 0 2021/tests/day17.txt | 0 2021/tests/day18.txt | 0 2021/tests/day19.txt | 0 2021/tests/day2.txt | 6 + 2021/tests/day20.txt | 0 2021/tests/day21.txt | 0 2021/tests/day22.txt | 0 2021/tests/day23.txt | 0 2021/tests/day24.txt | 0 2021/tests/day25.txt | 0 2021/tests/day3.txt | 12 + 2021/tests/day4.txt | 19 + 2021/tests/day5.txt | 0 2021/tests/day6.txt | 0 2021/tests/day7.txt | 0 2021/tests/day8.txt | 0 2021/tests/day9.txt | 0 74 files changed, 5041 insertions(+), 4 deletions(-) create mode 100644 2021/day1.py create mode 100644 2021/day10.py create mode 100644 2021/day11.py create mode 100644 2021/day12.py create mode 100644 2021/day13.py create mode 100644 2021/day14.py create mode 100644 2021/day15.py create mode 100644 2021/day16.py create mode 100644 2021/day17.py create mode 100644 2021/day18.py create mode 100644 2021/day19.py create mode 100644 2021/day2.py create mode 100644 2021/day20.py create mode 100644 2021/day21.py create mode 100644 2021/day22.py create mode 100644 2021/day23.py create mode 100644 2021/day24.py create mode 100644 2021/day25.py create mode 100644 2021/day3.py create mode 100644 2021/day4.py create mode 100644 2021/day6.py create mode 100644 2021/day7.py create mode 100644 2021/day8.py create mode 100644 2021/day9.py create mode 100644 2021/inputs/day1.txt create mode 100644 2021/inputs/day10.txt create mode 100644 2021/inputs/day11.txt create mode 100644 2021/inputs/day12.txt create mode 100644 2021/inputs/day13.txt create mode 100644 2021/inputs/day14.txt create mode 100644 2021/inputs/day15.txt create mode 100644 2021/inputs/day16.txt create mode 100644 2021/inputs/day17.txt create mode 100644 2021/inputs/day18.txt create mode 100644 2021/inputs/day19.txt create mode 100644 2021/inputs/day2.txt create mode 100644 2021/inputs/day20.txt create mode 100644 2021/inputs/day21.txt create mode 100644 2021/inputs/day22.txt create mode 100644 2021/inputs/day23.txt create mode 100644 2021/inputs/day24.txt create mode 100644 2021/inputs/day25.txt create mode 100644 2021/inputs/day3.txt create mode 100644 2021/inputs/day4.txt create mode 100644 2021/inputs/day6.txt create mode 100644 2021/inputs/day7.txt create mode 100644 2021/inputs/day8.txt create mode 100644 2021/inputs/day9.txt create mode 100644 2021/tests/day1.txt create mode 100644 2021/tests/day10.txt create mode 100644 2021/tests/day11.txt create mode 100644 2021/tests/day12.txt create mode 100644 2021/tests/day13.txt create mode 100644 2021/tests/day14.txt create mode 100644 2021/tests/day15.txt create mode 100644 2021/tests/day16.txt create mode 100644 2021/tests/day17.txt create mode 100644 2021/tests/day18.txt create mode 100644 2021/tests/day19.txt create mode 100644 2021/tests/day2.txt create mode 100644 2021/tests/day20.txt create mode 100644 2021/tests/day21.txt create mode 100644 2021/tests/day22.txt create mode 100644 2021/tests/day23.txt create mode 100644 2021/tests/day24.txt create mode 100644 2021/tests/day25.txt create mode 100644 2021/tests/day3.txt create mode 100644 2021/tests/day4.txt create mode 100644 2021/tests/day5.txt create mode 100644 2021/tests/day6.txt create mode 100644 2021/tests/day7.txt create mode 100644 2021/tests/day8.txt create mode 100644 2021/tests/day9.txt diff --git a/2021/day1.py b/2021/day1.py new file mode 100644 index 0000000..3fa54b5 --- /dev/null +++ b/2021/day1.py @@ -0,0 +1,14 @@ +import sys + +lines = sys.stdin.read().splitlines() + +values = [int(line) for line in lines] + +# part 1 +answer_1 = sum(v2 > v1 for v1, v2 in zip(values[:-1], values[1:])) +print(f"answer 1 is {answer_1}") + +# part 2 +runnings = [sum(values[i : i + 3]) for i in range(len(values) - 2)] +answer_2 = sum(v2 > v1 for v1, v2 in zip(runnings[:-1], runnings[1:])) +print(f"answer 2 is {answer_2}") diff --git a/2021/day10.py b/2021/day10.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day10.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day11.py b/2021/day11.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day11.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day12.py b/2021/day12.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day12.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day13.py b/2021/day13.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day13.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day14.py b/2021/day14.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day14.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day15.py b/2021/day15.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day15.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day16.py b/2021/day16.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day16.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day17.py b/2021/day17.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day17.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day18.py b/2021/day18.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day18.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day19.py b/2021/day19.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day19.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day2.py b/2021/day2.py new file mode 100644 index 0000000..dbec539 --- /dev/null +++ b/2021/day2.py @@ -0,0 +1,40 @@ +import sys +from math import prod +from typing import Literal, cast + +lines = sys.stdin.read().splitlines() + +commands = [ + (cast(Literal["forward", "up", "down"], (p := line.split())[0]), int(p[1])) + for line in lines +] + + +def depth_and_position(use_aim: bool): + aim, pos, depth = 0, 0, 0 + for command, value in commands: + d_depth = 0 + match command: + case "forward": + pos += value + depth += value * aim + case "up": + d_depth = -value + case "down": + d_depth = value + + if use_aim: + aim += d_depth + else: + depth += value + + return depth, pos + + +# part 1 +answer_1 = prod(depth_and_position(False)) +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = prod(depth_and_position(True)) +print(f"answer 2 is {answer_2}") diff --git a/2021/day20.py b/2021/day20.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day20.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day21.py b/2021/day21.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day21.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day22.py b/2021/day22.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day22.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day23.py b/2021/day23.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day23.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day24.py b/2021/day24.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day24.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day25.py b/2021/day25.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day25.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day3.py b/2021/day3.py new file mode 100644 index 0000000..9b21ba4 --- /dev/null +++ b/2021/day3.py @@ -0,0 +1,39 @@ +import sys +from collections import Counter +from typing import Literal + + +def generator_rating( + values: list[str], most_common: bool, default: Literal["0", "1"] +) -> str: + index = 0 + most_common_idx = 0 if most_common else 1 + + while len(values) > 1: + cnt = Counter(value[index] for value in values) + bit = cnt.most_common(2)[most_common_idx][0] + if cnt["0"] == cnt["1"]: + bit = default + values = [value for value in values if value[index] == bit] + index += 1 + + return values[0] + + +lines = sys.stdin.read().splitlines() + + +# part 1 +most_and_least_common = [ + tuple(Counter(line[col] for line in lines).most_common(2)[m][0] for m in range(2)) + for col in range(len(lines[0])) +] +gamma_rate = int("".join(most for most, _ in most_and_least_common), base=2) +epsilon_rate = int("".join(least for _, least in most_and_least_common), base=2) +print(f"answer 1 is {gamma_rate * epsilon_rate}") + +# part 2 +oxygen_generator_rating = int(generator_rating(lines, True, "1"), base=2) +co2_scrubber_rating = int(generator_rating(lines, False, "0"), base=2) +answer_2 = oxygen_generator_rating * co2_scrubber_rating +print(f"answer 2 is {answer_2}") diff --git a/2021/day4.py b/2021/day4.py new file mode 100644 index 0000000..73da546 --- /dev/null +++ b/2021/day4.py @@ -0,0 +1,40 @@ +import sys + +import numpy as np + +lines = sys.stdin.read().splitlines() + +numbers = [int(c) for c in lines[0].split(",")] + +boards = np.asarray( + [ + [[int(c) for c in line.split()] for line in lines[start : start + 5]] + for start in range(2, len(lines), 6) + ] +) + +# part 1 +marked = np.zeros_like(boards, dtype=bool) +winning_rounds: list[tuple[int, int]] = [(-1, -1) for _ in range(len(boards))] +for round, number in enumerate(numbers): + marked[boards == number] = True + + for index in range(len(boards)): + if winning_rounds[index][0] > 0: + continue + + if np.any(np.all(marked[index], axis=0) | np.all(marked[index], axis=1)): + winning_rounds[index] = ( + round, + number * int(np.sum(boards[index][~marked[index]])), + ) + + if np.all(marked.all(axis=1) | marked.all(axis=2)): + break + +(_, score) = min(winning_rounds, key=lambda w: w[0]) +print(f"answer 1 is {score}") + +# part 2 +(_, score) = max(winning_rounds, key=lambda w: w[0]) +print(f"answer 2 is {score}") diff --git a/2021/day5.py b/2021/day5.py index d1639f5..5e75518 100644 --- a/2021/day5.py +++ b/2021/day5.py @@ -1,7 +1,4 @@ -# -*- encoding: utf-8 -*- - import sys -from collections import defaultdict import numpy as np @@ -34,7 +31,6 @@ counts_1 = np.zeros((y_max + 1, x_max + 1), dtype=int) counts_2 = counts_1.copy() for (x1, y1), (x2, y2) in sections: - x_rng = range(x1, x2 + 1, 1) if x2 >= x1 else range(x1, x2 - 1, -1) y_rng = range(y1, y2 + 1, 1) if y2 >= y1 else range(y1, y2 - 1, -1) diff --git a/2021/day6.py b/2021/day6.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day6.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day7.py b/2021/day7.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day7.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day8.py b/2021/day8.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day8.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/day9.py b/2021/day9.py new file mode 100644 index 0000000..992bf35 --- /dev/null +++ b/2021/day9.py @@ -0,0 +1,13 @@ +import sys +from collections import defaultdict +from dataclasses import dataclass + +lines = sys.stdin.read().splitlines() + +# part 1 +answer_1 = ... +print(f"answer 1 is {answer_1}") + +# part 2 +answer_2 = ... +print(f"answer 2 is {answer_2}") diff --git a/2021/inputs/day1.txt b/2021/inputs/day1.txt new file mode 100644 index 0000000..1a551ed --- /dev/null +++ b/2021/inputs/day1.txt @@ -0,0 +1,2000 @@ +176 +184 +188 +142 +151 +156 +157 +167 +166 +178 +182 +191 +190 +191 +192 +196 +197 +201 +204 +207 +212 +213 +231 +232 +234 +232 +239 +268 +279 +280 +282 +278 +283 +284 +283 +296 +302 +320 +321 +332 +334 +332 +335 +340 +347 +348 +352 +342 +334 +333 +332 +357 +365 +366 +386 +394 +391 +387 +388 +389 +391 +394 +381 +392 +394 +397 +407 +428 +441 +444 +447 +448 +449 +450 +449 +453 +467 +476 +472 +486 +512 +517 +519 +530 +533 +537 +538 +552 +554 +550 +575 +583 +585 +597 +598 +600 +601 +602 +606 +607 +609 +611 +603 +604 +597 +598 +599 +606 +612 +615 +626 +621 +623 +624 +627 +630 +642 +641 +644 +642 +645 +648 +640 +636 +640 +660 +669 +676 +688 +689 +712 +716 +711 +715 +698 +705 +729 +730 +731 +714 +720 +710 +723 +727 +730 +738 +739 +743 +753 +755 +763 +765 +761 +758 +759 +780 +803 +788 +789 +810 +827 +837 +849 +843 +853 +852 +853 +865 +866 +876 +878 +871 +874 +878 +884 +888 +892 +887 +893 +894 +905 +906 +887 +912 +905 +898 +901 +879 +882 +897 +920 +918 +911 +916 +922 +931 +933 +931 +936 +943 +945 +955 +956 +951 +957 +953 +960 +965 +973 +994 +1012 +1016 +1022 +1025 +1028 +1031 +1032 +1037 +1038 +1031 +1035 +1053 +1057 +1074 +1075 +1081 +1080 +1060 +1063 +1053 +1055 +1053 +1062 +1063 +1060 +1062 +1065 +1066 +1063 +1064 +1074 +1073 +1081 +1095 +1089 +1106 +1111 +1097 +1098 +1101 +1107 +1111 +1113 +1125 +1118 +1133 +1142 +1141 +1144 +1145 +1153 +1165 +1167 +1174 +1178 +1158 +1165 +1174 +1175 +1191 +1194 +1192 +1189 +1190 +1193 +1194 +1196 +1214 +1238 +1246 +1272 +1273 +1287 +1288 +1296 +1298 +1299 +1315 +1320 +1324 +1326 +1341 +1342 +1341 +1368 +1375 +1386 +1387 +1388 +1399 +1397 +1398 +1408 +1407 +1409 +1410 +1422 +1419 +1423 +1419 +1415 +1416 +1446 +1468 +1479 +1484 +1488 +1489 +1491 +1495 +1504 +1505 +1504 +1520 +1540 +1547 +1541 +1548 +1539 +1541 +1548 +1544 +1545 +1547 +1532 +1552 +1566 +1570 +1571 +1569 +1571 +1572 +1543 +1544 +1546 +1547 +1576 +1574 +1592 +1597 +1600 +1608 +1609 +1623 +1631 +1647 +1640 +1657 +1660 +1677 +1674 +1669 +1670 +1654 +1667 +1680 +1696 +1698 +1699 +1700 +1706 +1696 +1697 +1699 +1698 +1699 +1711 +1715 +1689 +1690 +1701 +1705 +1739 +1741 +1745 +1737 +1729 +1749 +1751 +1758 +1759 +1756 +1758 +1772 +1773 +1783 +1807 +1806 +1813 +1827 +1831 +1832 +1835 +1840 +1857 +1866 +1872 +1875 +1874 +1879 +1890 +1883 +1905 +1908 +1922 +1946 +1936 +1939 +1941 +1945 +1950 +1951 +1956 +1950 +1951 +1952 +1957 +1958 +1969 +1972 +2004 +2013 +2026 +2028 +2034 +2043 +2048 +2064 +2074 +2068 +2081 +2063 +2064 +2065 +2069 +2047 +2046 +2033 +2035 +2034 +2035 +2037 +2038 +2033 +2038 +2039 +2046 +2047 +2048 +2043 +2083 +2086 +2093 +2107 +2108 +2091 +2105 +2113 +2109 +2106 +2116 +2119 +2126 +2127 +2132 +2135 +2147 +2148 +2143 +2150 +2151 +2153 +2166 +2171 +2173 +2175 +2178 +2180 +2192 +2227 +2231 +2253 +2255 +2256 +2257 +2258 +2259 +2269 +2277 +2279 +2282 +2308 +2309 +2333 +2340 +2346 +2354 +2355 +2371 +2372 +2375 +2393 +2394 +2400 +2404 +2400 +2402 +2393 +2388 +2403 +2402 +2422 +2424 +2417 +2416 +2421 +2422 +2431 +2428 +2409 +2405 +2415 +2411 +2413 +2415 +2419 +2423 +2431 +2432 +2450 +2460 +2466 +2458 +2461 +2462 +2463 +2471 +2476 +2489 +2490 +2491 +2492 +2490 +2491 +2495 +2511 +2514 +2516 +2514 +2516 +2519 +2525 +2527 +2501 +2503 +2506 +2513 +2537 +2543 +2547 +2554 +2570 +2580 +2601 +2611 +2609 +2611 +2617 +2620 +2623 +2615 +2619 +2633 +2648 +2649 +2662 +2670 +2671 +2675 +2707 +2708 +2717 +2718 +2719 +2739 +2742 +2737 +2738 +2739 +2759 +2771 +2783 +2784 +2800 +2805 +2820 +2815 +2836 +2837 +2839 +2867 +2869 +2868 +2874 +2881 +2883 +2909 +2903 +2904 +2909 +2912 +2914 +2920 +2921 +2923 +2928 +2929 +2930 +2909 +2915 +2927 +2928 +2930 +2923 +2921 +2918 +2911 +2915 +2920 +2929 +2930 +2940 +2942 +2951 +2969 +2980 +2985 +2989 +2983 +2986 +2994 +3002 +3017 +3027 +3042 +3048 +3050 +3048 +3049 +3073 +3080 +3082 +3071 +3094 +3124 +3132 +3133 +3137 +3138 +3142 +3161 +3176 +3188 +3185 +3189 +3193 +3194 +3195 +3196 +3200 +3211 +3212 +3215 +3223 +3224 +3230 +3234 +3227 +3231 +3218 +3213 +3218 +3239 +3225 +3216 +3224 +3226 +3229 +3230 +3231 +3212 +3225 +3234 +3237 +3236 +3237 +3243 +3252 +3257 +3261 +3260 +3263 +3265 +3266 +3272 +3279 +3280 +3285 +3284 +3290 +3291 +3290 +3307 +3312 +3342 +3344 +3343 +3344 +3343 +3342 +3343 +3340 +3344 +3348 +3349 +3337 +3346 +3357 +3361 +3369 +3370 +3383 +3375 +3371 +3375 +3397 +3401 +3407 +3408 +3409 +3391 +3394 +3393 +3396 +3399 +3404 +3407 +3409 +3411 +3412 +3415 +3433 +3437 +3449 +3446 +3447 +3448 +3444 +3445 +3441 +3456 +3479 +3488 +3487 +3491 +3496 +3485 +3498 +3500 +3533 +3537 +3544 +3545 +3544 +3553 +3559 +3567 +3590 +3577 +3586 +3584 +3594 +3595 +3594 +3603 +3617 +3619 +3624 +3652 +3627 +3622 +3647 +3648 +3650 +3667 +3668 +3664 +3672 +3678 +3688 +3689 +3696 +3704 +3690 +3691 +3692 +3683 +3685 +3684 +3689 +3693 +3694 +3693 +3696 +3704 +3717 +3722 +3718 +3690 +3691 +3687 +3688 +3685 +3687 +3688 +3701 +3698 +3699 +3700 +3702 +3708 +3704 +3711 +3714 +3719 +3730 +3731 +3730 +3751 +3757 +3760 +3766 +3767 +3764 +3761 +3742 +3771 +3789 +3810 +3807 +3787 +3792 +3791 +3792 +3797 +3802 +3801 +3809 +3817 +3850 +3851 +3853 +3860 +3861 +3866 +3862 +3853 +3857 +3861 +3868 +3869 +3870 +3879 +3893 +3894 +3903 +3912 +3944 +3955 +3956 +3960 +3986 +3969 +3970 +3974 +3976 +4006 +4008 +4013 +4038 +4043 +4056 +4071 +4076 +4097 +4098 +4099 +4109 +4111 +4112 +4118 +4126 +4128 +4129 +4125 +4124 +4126 +4127 +4130 +4150 +4153 +4168 +4187 +4186 +4171 +4166 +4172 +4182 +4201 +4226 +4227 +4251 +4250 +4263 +4294 +4317 +4318 +4332 +4330 +4308 +4309 +4310 +4313 +4329 +4331 +4349 +4350 +4348 +4345 +4347 +4342 +4340 +4342 +4359 +4371 +4387 +4412 +4411 +4412 +4415 +4422 +4423 +4427 +4455 +4456 +4460 +4471 +4485 +4491 +4492 +4491 +4492 +4521 +4527 +4532 +4539 +4552 +4537 +4551 +4562 +4566 +4581 +4588 +4590 +4591 +4590 +4595 +4596 +4597 +4598 +4618 +4617 +4618 +4621 +4622 +4628 +4632 +4628 +4644 +4629 +4643 +4635 +4639 +4640 +4645 +4647 +4639 +4641 +4642 +4645 +4657 +4645 +4650 +4655 +4671 +4674 +4675 +4670 +4671 +4702 +4715 +4714 +4722 +4723 +4727 +4737 +4733 +4761 +4762 +4763 +4766 +4772 +4773 +4774 +4775 +4778 +4779 +4786 +4787 +4788 +4792 +4796 +4797 +4795 +4796 +4816 +4807 +4839 +4841 +4842 +4843 +4860 +4862 +4839 +4842 +4843 +4844 +4846 +4848 +4846 +4844 +4847 +4849 +4855 +4859 +4852 +4855 +4864 +4865 +4889 +4892 +4891 +4893 +4890 +4891 +4892 +4914 +4913 +4912 +4915 +4918 +4920 +4924 +4927 +4922 +4914 +4913 +4912 +4920 +4913 +4915 +4917 +4919 +4922 +4930 +4924 +4918 +4930 +4937 +4932 +4933 +4938 +4942 +4943 +4944 +4945 +4962 +4965 +4967 +4948 +4937 +4938 +4943 +4950 +4934 +4945 +4946 +4962 +4964 +4977 +4988 +5005 +5025 +5024 +5049 +5055 +5060 +5050 +5051 +5049 +5050 +5049 +5053 +5063 +5086 +5121 +5138 +5150 +5155 +5154 +5165 +5176 +5154 +5155 +5163 +5154 +5190 +5193 +5192 +5194 +5192 +5194 +5203 +5219 +5223 +5237 +5250 +5251 +5250 +5254 +5257 +5242 +5245 +5244 +5250 +5253 +5262 +5251 +5276 +5277 +5273 +5275 +5274 +5283 +5290 +5303 +5309 +5315 +5317 +5321 +5318 +5325 +5324 +5325 +5332 +5353 +5355 +5331 +5332 +5351 +5374 +5377 +5379 +5370 +5383 +5377 +5381 +5388 +5389 +5424 +5425 +5431 +5432 +5433 +5400 +5411 +5415 +5428 +5429 +5416 +5419 +5446 +5455 +5462 +5463 +5466 +5479 +5480 +5489 +5490 +5491 +5495 +5516 +5506 +5507 +5508 +5511 +5509 +5522 +5521 +5525 +5533 +5556 +5558 +5555 +5559 +5561 +5552 +5553 +5565 +5566 +5579 +5584 +5585 +5582 +5583 +5595 +5596 +5618 +5620 +5621 +5622 +5631 +5633 +5634 +5635 +5637 +5638 +5637 +5638 +5647 +5646 +5684 +5683 +5685 +5687 +5690 +5697 +5691 +5692 +5689 +5692 +5695 +5705 +5707 +5729 +5730 +5717 +5726 +5727 +5734 +5730 +5737 +5735 +5736 +5755 +5752 +5764 +5762 +5761 +5765 +5774 +5775 +5776 +5753 +5754 +5763 +5769 +5768 +5773 +5772 +5779 +5776 +5793 +5802 +5815 +5819 +5816 +5811 +5812 +5814 +5812 +5815 +5813 +5827 +5800 +5802 +5801 +5802 +5805 +5809 +5817 +5826 +5832 +5833 +5836 +5838 +5840 +5853 +5859 +5870 +5873 +5879 +5891 +5898 +5907 +5902 +5905 +5910 +5914 +5918 +5913 +5914 +5913 +5914 +5935 +5954 +5963 +5964 +5973 +5977 +5978 +5988 +5980 +5981 +5984 +5986 +5985 +5987 +5995 +6002 +6003 +6001 +6007 +6009 +6012 +6019 +6022 +6023 +6022 +6023 +6024 +6025 +6027 +6028 +6030 +6032 +6050 +6041 +6042 +6041 +6043 +6044 +6079 +6086 +6077 +6088 +6098 +6100 +6101 +6103 +6105 +6106 +6114 +6118 +6119 +6121 +6130 +6138 +6139 +6135 +6146 +6147 +6150 +6162 +6163 +6180 +6188 +6190 +6196 +6192 +6195 +6205 +6203 +6204 +6206 +6207 +6203 +6204 +6205 +6211 +6210 +6214 +6230 +6233 +6234 +6248 +6239 +6249 +6263 +6265 +6273 +6275 +6274 +6278 +6272 +6286 +6288 +6292 +6271 +6276 +6285 +6286 +6287 +6291 +6300 +6307 +6312 +6313 +6314 +6316 +6317 +6331 +6332 +6334 +6332 +6331 +6344 +6339 +6350 +6354 +6356 +6358 +6361 +6370 +6374 +6377 +6363 +6364 +6367 +6360 +6356 +6358 +6361 +6362 +6364 +6386 +6393 +6415 +6419 +6421 +6418 +6424 +6426 +6433 +6442 +6444 +6436 +6440 +6442 +6441 +6444 +6450 +6432 +6451 +6467 +6472 +6476 +6469 +6470 +6468 +6480 +6503 +6505 +6506 +6493 +6495 +6496 +6504 +6509 +6500 +6491 +6503 +6524 +6542 +6556 +6557 +6566 +6577 +6573 +6579 +6586 +6587 +6595 +6606 +6612 +6615 +6633 +6635 +6636 +6634 +6624 +6626 +6627 +6641 +6644 +6654 +6657 +6656 +6655 +6658 +6660 +6665 +6664 +6665 +6685 +6676 +6677 +6679 +6682 +6712 +6717 +6724 +6733 +6735 +6742 +6747 +6771 +6772 +6788 +6802 +6814 +6815 +6814 +6820 +6819 +6823 +6822 +6826 +6835 +6840 +6842 +6847 +6843 +6823 +6829 +6824 +6823 +6825 +6826 +6825 +6829 +6830 +6831 +6847 +6876 +6878 +6879 +6880 +6881 +6888 +6909 +6912 +6913 +6911 +6920 +6923 +6927 +6941 +6951 +6946 +6948 +6954 +6957 +6956 +6958 +6964 +6966 +6971 +6972 +6985 +6987 +6988 +6989 +6997 +6998 +6986 +6988 +6987 +6994 +7000 +7004 +7009 +7020 +7025 +7035 +7045 +7047 +7062 +7065 +7066 +7052 +7053 +7052 +7046 +7050 +7053 +7054 +7057 +7047 +7050 +7036 +7043 +7034 +7016 +7040 +7039 +7040 +7042 +7029 +7037 +7052 +7056 +7057 +7058 +7062 +7063 +7051 +7053 +7056 +7057 +7058 +7059 +7061 +7082 +7081 +7089 +7090 +7086 +7090 +7094 +7095 +7100 +7101 +7076 +7079 +7085 +7089 +7093 +7109 +7110 +7104 +7093 +7100 +7111 +7109 +7104 +7116 +7117 +7115 +7111 +7124 +7125 +7124 +7125 +7120 +7118 +7119 +7112 +7114 +7115 +7141 +7140 +7141 +7168 +7158 +7189 +7195 +7196 +7193 +7221 +7225 +7227 +7228 +7229 +7239 +7242 +7243 +7252 +7260 +7276 +7278 +7277 +7295 +7298 +7313 +7296 +7297 +7319 +7342 +7343 +7347 +7359 +7343 +7344 +7348 +7361 +7365 +7366 +7368 +7377 +7378 +7375 +7376 +7368 +7388 +7385 +7400 +7401 +7402 +7404 +7413 +7411 +7414 +7415 +7417 +7422 +7421 +7419 +7428 +7437 +7436 +7437 +7440 +7442 +7440 +7442 +7463 +7478 +7488 +7506 +7510 +7518 +7531 +7537 +7534 +7533 +7523 +7522 +7538 +7528 +7530 +7533 +7535 +7530 +7546 +7547 +7548 +7545 +7546 +7541 +7553 +7554 +7555 +7556 +7564 +7568 +7589 +7590 +7609 +7619 +7624 +7627 +7629 +7630 +7651 +7664 +7658 +7656 +7667 +7670 +7678 +7682 +7683 +7694 +7695 +7696 +7704 +7706 +7716 +7723 +7722 +7725 +7730 +7728 +7729 +7723 +7738 +7717 +7711 +7727 +7705 +7716 +7713 +7703 +7710 +7712 +7713 +7714 +7715 +7718 +7721 +7735 +7739 +7722 +7726 +7727 +7737 +7743 +7744 +7724 +7723 +7724 +7726 +7754 +7760 +7758 +7769 +7768 +7769 +7775 +7776 +7777 +7785 +7822 +7823 +7822 +7824 +7826 +7849 +7854 +7860 +7836 +7839 +7838 +7839 +7859 +7861 +7862 +7863 +7873 +7863 +7885 +7887 +7889 +7882 +7881 +7882 +7883 +7888 +7890 +7902 +7907 +7908 +7942 +7947 +7946 +7948 +7949 +7952 +7953 +7952 +7954 +7937 +7933 +7928 +7932 +7933 +7938 +7939 +7941 +7943 +7944 +7946 +7940 +7941 +7940 +7935 +7938 +7939 +7938 +7965 +7986 +8006 +7999 +8000 +8016 +8027 +8026 +8027 +8030 +8031 +8032 +8033 +8035 +8036 +8038 +8041 +8054 +8059 +8060 +8055 +8053 +8058 +8067 +8071 +8081 +8082 +8083 +8099 +8121 +8102 +8101 +8093 +8106 +8113 +8114 +8117 +8121 +8146 +8158 +8144 +8146 +8150 +8173 +8199 +8198 +8202 +8207 +8196 +8200 +8202 +8219 +8225 +8238 +8241 +8242 +8276 +8283 +8285 +8290 +8291 +8292 +8293 +8294 +8297 +8298 +8310 +8311 +8315 +8317 +8321 +8304 +8303 +8304 +8299 +8306 +8317 +8320 +8341 diff --git a/2021/inputs/day10.txt b/2021/inputs/day10.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day11.txt b/2021/inputs/day11.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day12.txt b/2021/inputs/day12.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day13.txt b/2021/inputs/day13.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day14.txt b/2021/inputs/day14.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day15.txt b/2021/inputs/day15.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day16.txt b/2021/inputs/day16.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day17.txt b/2021/inputs/day17.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day18.txt b/2021/inputs/day18.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day19.txt b/2021/inputs/day19.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day2.txt b/2021/inputs/day2.txt new file mode 100644 index 0000000..fb1384e --- /dev/null +++ b/2021/inputs/day2.txt @@ -0,0 +1,1000 @@ +forward 8 +down 6 +down 8 +forward 7 +down 5 +up 2 +down 3 +down 7 +down 8 +down 8 +down 8 +down 2 +up 1 +down 3 +up 2 +down 4 +down 2 +forward 6 +forward 4 +down 3 +down 2 +forward 2 +forward 1 +forward 4 +forward 5 +forward 8 +down 1 +down 4 +up 5 +up 2 +forward 3 +down 9 +forward 7 +forward 9 +forward 9 +forward 8 +down 1 +down 2 +forward 7 +down 3 +forward 6 +down 4 +forward 7 +down 1 +up 8 +forward 3 +down 1 +forward 7 +up 1 +forward 8 +up 6 +up 2 +down 6 +forward 1 +up 6 +forward 5 +down 9 +up 5 +forward 7 +forward 9 +down 9 +down 3 +forward 7 +forward 8 +forward 3 +forward 9 +forward 7 +down 3 +down 7 +down 4 +forward 2 +down 7 +down 3 +down 5 +up 1 +down 9 +up 4 +forward 1 +up 9 +down 2 +forward 8 +down 8 +down 6 +forward 7 +down 9 +down 3 +forward 8 +forward 3 +down 6 +down 7 +down 4 +forward 3 +down 3 +down 9 +forward 8 +forward 9 +up 5 +forward 1 +down 3 +down 3 +down 3 +down 9 +down 2 +down 9 +forward 5 +up 3 +up 5 +up 7 +down 2 +down 7 +down 9 +down 5 +down 4 +down 8 +forward 1 +up 8 +up 3 +forward 1 +forward 5 +forward 3 +up 7 +down 9 +down 9 +forward 7 +down 1 +forward 1 +forward 8 +forward 6 +down 1 +down 7 +forward 9 +up 4 +forward 8 +up 6 +forward 3 +down 3 +down 9 +forward 5 +up 3 +down 7 +forward 9 +forward 2 +up 1 +forward 7 +up 8 +forward 7 +forward 1 +up 3 +up 7 +down 1 +forward 5 +up 8 +down 2 +up 2 +up 3 +down 5 +forward 6 +up 8 +down 7 +up 8 +up 4 +down 8 +forward 9 +down 8 +down 2 +up 7 +down 5 +forward 1 +up 1 +down 1 +forward 1 +forward 1 +forward 3 +forward 8 +down 4 +down 5 +forward 9 +up 6 +up 7 +down 8 +forward 8 +down 2 +forward 6 +down 3 +forward 9 +forward 5 +up 7 +down 2 +up 6 +up 6 +down 9 +forward 3 +up 1 +up 2 +forward 9 +down 1 +up 3 +forward 4 +forward 9 +down 3 +down 4 +forward 4 +up 6 +up 5 +forward 2 +down 5 +down 1 +forward 9 +down 7 +up 6 +up 5 +forward 4 +forward 9 +down 6 +forward 1 +up 6 +down 1 +forward 4 +up 9 +down 6 +forward 5 +down 2 +forward 8 +forward 9 +down 7 +down 4 +down 1 +forward 1 +down 4 +down 6 +forward 5 +forward 2 +forward 8 +forward 5 +down 6 +up 9 +forward 2 +down 1 +forward 6 +forward 6 +down 5 +forward 5 +down 8 +forward 3 +down 5 +up 1 +forward 4 +down 5 +down 4 +forward 4 +down 3 +down 5 +down 7 +forward 5 +forward 2 +up 2 +up 4 +forward 7 +down 3 +down 1 +down 7 +up 8 +forward 6 +forward 3 +forward 7 +forward 5 +up 5 +down 3 +down 6 +forward 7 +up 9 +up 5 +forward 2 +down 9 +forward 8 +forward 6 +forward 5 +up 5 +down 9 +down 8 +up 2 +up 4 +forward 5 +forward 2 +up 4 +forward 3 +down 7 +forward 8 +forward 1 +forward 9 +forward 6 +up 7 +up 2 +forward 1 +down 5 +forward 9 +down 8 +down 4 +down 7 +up 2 +down 5 +forward 7 +up 3 +forward 6 +down 2 +forward 8 +forward 8 +up 3 +forward 6 +forward 9 +forward 8 +forward 3 +up 9 +forward 9 +down 6 +forward 5 +forward 8 +up 1 +forward 2 +forward 6 +forward 8 +up 6 +down 3 +down 9 +down 6 +up 7 +forward 6 +forward 1 +forward 1 +forward 7 +down 5 +down 9 +down 3 +up 3 +forward 3 +forward 2 +down 5 +up 4 +forward 1 +down 9 +forward 9 +forward 1 +forward 1 +down 9 +down 2 +forward 4 +forward 9 +down 5 +up 5 +down 6 +forward 8 +down 4 +down 1 +up 5 +up 3 +down 2 +down 3 +forward 8 +forward 5 +forward 9 +down 4 +up 9 +down 1 +forward 2 +down 8 +up 2 +down 8 +up 6 +forward 7 +down 1 +up 7 +down 9 +forward 9 +down 9 +forward 7 +forward 4 +down 5 +up 3 +down 3 +forward 8 +down 3 +down 4 +down 9 +forward 4 +up 4 +forward 6 +down 1 +forward 5 +down 2 +forward 6 +down 4 +down 1 +forward 3 +up 3 +up 3 +forward 8 +forward 6 +forward 6 +down 9 +forward 5 +down 9 +forward 6 +forward 3 +up 4 +forward 6 +down 8 +up 3 +down 9 +down 3 +forward 6 +down 4 +down 8 +down 6 +down 5 +forward 1 +down 3 +forward 9 +down 9 +down 3 +forward 9 +down 2 +forward 3 +up 6 +forward 2 +forward 1 +forward 8 +down 2 +down 2 +down 7 +up 7 +forward 3 +up 2 +up 6 +up 6 +down 2 +forward 2 +forward 2 +down 6 +down 2 +up 6 +forward 4 +down 9 +up 3 +down 4 +forward 7 +up 6 +forward 3 +forward 1 +down 1 +down 8 +down 8 +down 1 +forward 2 +down 6 +down 6 +forward 2 +up 6 +down 2 +up 4 +down 1 +up 8 +up 5 +down 4 +forward 2 +forward 2 +down 2 +forward 9 +down 5 +down 9 +forward 6 +down 9 +down 5 +down 7 +down 3 +up 9 +down 6 +up 6 +up 8 +forward 8 +forward 8 +down 3 +up 9 +forward 9 +forward 8 +forward 6 +down 4 +down 6 +up 9 +down 9 +down 5 +up 2 +up 2 +forward 2 +forward 1 +down 5 +down 8 +up 3 +forward 2 +down 1 +down 9 +forward 7 +forward 5 +up 3 +up 6 +down 5 +up 1 +down 2 +up 7 +forward 1 +down 6 +up 6 +up 1 +up 2 +forward 2 +down 4 +up 1 +up 3 +up 9 +up 7 +forward 4 +down 5 +down 9 +down 8 +forward 1 +down 4 +forward 4 +forward 8 +up 4 +down 8 +down 1 +down 9 +down 5 +forward 3 +forward 8 +up 2 +down 6 +up 6 +forward 5 +down 6 +down 8 +forward 6 +down 6 +up 5 +down 2 +up 5 +down 7 +down 9 +forward 3 +down 8 +forward 1 +forward 5 +forward 2 +down 4 +forward 2 +forward 7 +up 7 +up 3 +down 2 +forward 7 +up 6 +forward 6 +forward 1 +down 4 +down 2 +down 6 +down 1 +forward 1 +forward 8 +down 1 +up 2 +down 2 +down 1 +down 6 +forward 7 +forward 6 +forward 5 +down 1 +down 8 +down 1 +up 5 +forward 6 +forward 5 +up 5 +forward 5 +up 8 +down 3 +forward 1 +forward 6 +up 8 +up 9 +down 7 +down 1 +forward 2 +forward 1 +forward 9 +forward 3 +forward 7 +forward 8 +down 6 +up 5 +down 1 +forward 1 +forward 8 +down 6 +forward 7 +forward 8 +down 7 +down 5 +down 7 +up 7 +down 5 +forward 5 +down 4 +down 7 +forward 6 +forward 5 +forward 6 +forward 7 +up 9 +down 2 +down 2 +down 4 +down 8 +up 3 +down 7 +down 5 +forward 6 +down 9 +down 5 +down 9 +down 1 +forward 6 +up 7 +down 2 +down 2 +forward 8 +forward 1 +down 3 +down 4 +forward 3 +forward 4 +down 1 +forward 9 +up 7 +forward 8 +down 9 +forward 7 +forward 6 +forward 2 +down 8 +up 9 +down 2 +forward 8 +up 7 +down 5 +down 9 +down 3 +down 6 +down 4 +up 2 +down 3 +down 1 +up 1 +up 6 +forward 4 +down 1 +forward 1 +up 4 +forward 4 +forward 3 +forward 8 +forward 9 +forward 9 +down 2 +down 5 +up 8 +up 1 +down 9 +forward 5 +down 1 +up 5 +down 4 +up 3 +forward 9 +up 7 +forward 9 +up 1 +forward 4 +forward 8 +up 6 +down 6 +down 8 +down 8 +down 9 +down 2 +up 7 +forward 9 +up 8 +down 9 +up 6 +forward 4 +up 7 +down 6 +up 7 +down 4 +forward 2 +forward 9 +down 6 +down 8 +forward 6 +forward 3 +down 3 +forward 3 +forward 7 +up 2 +down 8 +forward 7 +down 5 +down 1 +down 6 +down 5 +down 2 +up 6 +forward 7 +forward 6 +down 1 +down 5 +forward 7 +forward 3 +down 9 +down 8 +forward 5 +up 7 +forward 1 +up 5 +down 7 +forward 8 +forward 6 +forward 2 +down 1 +down 9 +up 1 +down 2 +down 2 +down 7 +down 4 +forward 1 +down 3 +down 5 +up 8 +forward 7 +up 5 +down 8 +down 6 +down 3 +down 3 +down 9 +down 7 +forward 4 +up 5 +forward 3 +forward 7 +down 3 +up 6 +forward 4 +forward 4 +down 4 +down 2 +up 1 +forward 8 +forward 3 +up 1 +forward 1 +down 9 +down 6 +up 1 +down 4 +down 8 +up 9 +forward 2 +down 3 +forward 8 +down 6 +down 5 +down 4 +up 5 +down 9 +up 3 +forward 4 +down 9 +down 7 +forward 6 +forward 6 +forward 8 +forward 6 +down 9 +down 1 +forward 3 +forward 9 +forward 4 +up 8 +up 5 +up 2 +down 9 +forward 9 +forward 3 +forward 5 +up 8 +down 2 +down 1 +forward 9 +forward 7 +down 7 +forward 1 +down 5 +down 8 +down 4 +down 7 +down 1 +down 4 +down 7 +forward 2 +down 5 +forward 1 +down 4 +down 5 +down 2 +up 5 +forward 9 +down 5 +forward 1 +down 7 +down 4 +down 7 +down 6 +forward 5 +down 3 +down 1 +up 2 +forward 2 +forward 2 +forward 1 +down 1 +forward 3 +forward 5 +forward 4 +down 7 +forward 7 +down 1 +forward 7 +forward 5 +down 8 +forward 6 +forward 6 +forward 6 +forward 7 +up 9 +down 4 +down 1 +down 8 +forward 7 +up 4 +forward 4 +down 6 +up 1 +forward 5 +forward 2 +down 1 +forward 7 +forward 6 +forward 5 +forward 2 +down 5 +down 6 +down 9 +up 4 +forward 6 +forward 2 +down 5 +down 3 +up 4 +down 6 +up 8 +forward 8 +up 9 +forward 6 +forward 6 +up 5 +down 7 +forward 9 +forward 6 +down 9 +down 9 +up 1 +forward 7 +down 6 +up 4 +down 8 +down 3 +forward 9 +forward 5 +forward 9 +down 2 +forward 3 +down 1 +forward 9 +up 4 +up 8 +forward 6 +down 1 +forward 9 +forward 4 +down 5 +forward 2 +up 3 +forward 5 +up 8 +up 7 +down 8 +forward 4 +down 6 +forward 7 +up 2 +down 2 +forward 4 +down 9 +down 8 +forward 2 +forward 2 +down 2 +down 3 +forward 3 +down 1 +forward 8 +down 7 +up 9 +down 4 +down 2 +down 5 +up 7 +down 8 +down 2 +down 4 +down 4 +down 8 +forward 7 +forward 7 +down 8 +up 2 +up 3 +forward 8 +up 1 +down 7 +forward 7 +down 6 +down 8 +up 6 +forward 5 +forward 3 +down 6 +forward 9 +up 4 +up 7 +forward 4 +down 1 +down 8 +down 1 +forward 9 +down 3 +forward 8 +forward 6 +forward 4 +down 9 +forward 3 +up 5 +up 8 +down 9 +down 5 +down 1 +up 8 +forward 8 +up 6 +forward 2 +down 8 +up 4 +up 7 +forward 7 +forward 5 +forward 9 +forward 2 +up 4 +down 9 +forward 7 +down 6 +down 6 +forward 7 +down 5 +up 6 +down 9 +forward 3 diff --git a/2021/inputs/day20.txt b/2021/inputs/day20.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day21.txt b/2021/inputs/day21.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day22.txt b/2021/inputs/day22.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day23.txt b/2021/inputs/day23.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day24.txt b/2021/inputs/day24.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day25.txt b/2021/inputs/day25.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day3.txt b/2021/inputs/day3.txt new file mode 100644 index 0000000..94b7450 --- /dev/null +++ b/2021/inputs/day3.txt @@ -0,0 +1,1000 @@ +110110000100 +010110011100 +001001101010 +011011101010 +101100010000 +010100110111 +010110101101 +111010110111 +100111110001 +001010110000 +011011000001 +100010100000 +000100110101 +101010001000 +111110000011 +001001111110 +010010010000 +111110110000 +110101100010 +011010010011 +010101011101 +100101111100 +010111101010 +110000101111 +100011100011 +101101110101 +001010010000 +100011001111 +010001111000 +101110000100 +111010010011 +111101010010 +000001010011 +111111110001 +111111111011 +110000011011 +100100100101 +110011110011 +100101001011 +110110101101 +000101110101 +100001101110 +101001001010 +111111001110 +101111001110 +011100110000 +001011001110 +000000110010 +101100101111 +110100000110 +110001100111 +110100000100 +011010000001 +000000110000 +100101100011 +010100101101 +001101100111 +101011000110 +101111001000 +111110111100 +000111000100 +101111000010 +011100100010 +100010010110 +011100000000 +101110110100 +001010100001 +001100100111 +001110100010 +000110111000 +000110101110 +011101011000 +111000110000 +000110100011 +000111101010 +000110111100 +000011100110 +011010001100 +100111100010 +110110000010 +000010101001 +010111000101 +011001011101 +100000000010 +101110100111 +101111000110 +100000011100 +001000001001 +100110100111 +001010000001 +010111101110 +101100011000 +000010100101 +010001001111 +100000110000 +000001000010 +100111010001 +001001100110 +101111100110 +111101110000 +001011101110 +110111010011 +110010000011 +101001100100 +000000111110 +001110011100 +010001101110 +011011110111 +100111100110 +100110000001 +001000001010 +100110111010 +000101101010 +011110011100 +011111110101 +000000101011 +111100100110 +100000010111 +000010011000 +001010111011 +011011011000 +110011101110 +101001100110 +001100010111 +110011010011 +111000101000 +110001010010 +100010111101 +000110111111 +001001110100 +010010111000 +001111010100 +101001001110 +110011010111 +000110010001 +000100101101 +001110001001 +000000111010 +001000010101 +000000001011 +101001011010 +111000000000 +101000010001 +100101111000 +101100001001 +110011011011 +000100101011 +010100110101 +000000000100 +101000010100 +011001110101 +010000100000 +010010010011 +101101000100 +111111000111 +101001111110 +101001010010 +000000101010 +000000100111 +110110100100 +110100110000 +000111100111 +010100100100 +100110100000 +010111100010 +111111010010 +101010101010 +010000111011 +101010111011 +011100101011 +100110010100 +101101101011 +000001101110 +011011011111 +111110001001 +100110101100 +011001111010 +001100110000 +001111001110 +111111111110 +101000000110 +110000111001 +000110000110 +010001010001 +000100010001 +111010111010 +101011101011 +000111000000 +001010111010 +011101100110 +110001010000 +111101011110 +010101010010 +000101010111 +111011101101 +110111011100 +011110100111 +101100101101 +110111100111 +010110010011 +110001011010 +110110110000 +011000000111 +100001100001 +011100011110 +011100011001 +011001001111 +100011011110 +110010001111 +100101101000 +001110101111 +111011101111 +101001000011 +010000000100 +001001110010 +010101000111 +111010001010 +010000111100 +100011111000 +100110010101 +100000100100 +011110000110 +010111010100 +011000100001 +101101011000 +011100001101 +000010001001 +000010101011 +100010101000 +101001011001 +111101100001 +000101111110 +000111011111 +011011011010 +001011111101 +100101010110 +001101110011 +010010110101 +100010010111 +101000011010 +001011010011 +001010111101 +110001001101 +110011001100 +001001011000 +001110111000 +110111011001 +111010110000 +101100110101 +000100100101 +101101011110 +101001110111 +000101000110 +010000010100 +011011010111 +000111111001 +110101001000 +010011101001 +111010011100 +011110010000 +110001010001 +100110110111 +001101010011 +001010001110 +111001101000 +111101000010 +101110100010 +100101111111 +100010001010 +110010000101 +011110011000 +000010111001 +111101011010 +100111000011 +001110101001 +100100110100 +011100001110 +101101100110 +001101110001 +101000100000 +110000101010 +011001110000 +101101110110 +010011000100 +010100001110 +101111101101 +100001100000 +111001111101 +111001100010 +001101001001 +001101110100 +100110101111 +000000101000 +001000111011 +110011010010 +111000001000 +000101010000 +001001011001 +101001110110 +111000000101 +010011010001 +111011001000 +100100111110 +111110001000 +001101000011 +111110011111 +111111101111 +101001011011 +110010100100 +000011100000 +001101000010 +111100001100 +001101000000 +011000100111 +000100100100 +111100011100 +011110000011 +110111001101 +110001000001 +011111110100 +101010011111 +011010110110 +001010100010 +010011100110 +010111010110 +111111110010 +011001001010 +001110100101 +010110010000 +111000110100 +000010101110 +100110000101 +110001110111 +001100001100 +010110111111 +100010010011 +111100110111 +111011101001 +011000001000 +100111001100 +100100100010 +010001111100 +100101001101 +001101111011 +000101010100 +010101101010 +000100010000 +110101110101 +001111011111 +010011111101 +111010110110 +111000000111 +001001111010 +100101110110 +110100010011 +001000001110 +110001100011 +000101010001 +101100110000 +101010011010 +011000110101 +000000010110 +011001010000 +010110100101 +010000101001 +000000111100 +010101100011 +010110001001 +101010101100 +110100001101 +010111111000 +000011100001 +100000001100 +111001100111 +001111111100 +110010101000 +100111000101 +110001101000 +010111001100 +001110110111 +001000110101 +000110001011 +011001000100 +000101000001 +101001000110 +000011101011 +110111111110 +101100000101 +000010011101 +011111010101 +000100110111 +010111011000 +001000010110 +101010111101 +110000111100 +011000011100 +101010100111 +100110110110 +010000100001 +001010101100 +001001100000 +010110000101 +100010000000 +010110101010 +101000110110 +011000000011 +111000101110 +101110101100 +000100111101 +111100001000 +011111011000 +101101101010 +111001011110 +111100100100 +000100010101 +011000011010 +010000111000 +010000011110 +101100111011 +011001100100 +000110001000 +010010000111 +001011101010 +001110000001 +010001100001 +001111100010 +000010111010 +001000101111 +100111110100 +101010110111 +010010111010 +101100010011 +011100000101 +001101100110 +011111000000 +011000110010 +001110110110 +101110001001 +000101101001 +011111111111 +100010100011 +100111000001 +111010001100 +111101000101 +000101100000 +110001010110 +111100111100 +000100110000 +101000101100 +001100100101 +001101011101 +110011110101 +011101000011 +001000010001 +110111101011 +010101001110 +100110110000 +111000111011 +011100001111 +011101000101 +011011110000 +111101001110 +000001111011 +000110110101 +110010001011 +011011001001 +011101011101 +011000100000 +110000110110 +100010111111 +010010110111 +001011110110 +011001110110 +011100110110 +110010110001 +100011011001 +000101101000 +110000000010 +010011101010 +100100011000 +000000001110 +100011101111 +100000111010 +011010111010 +100110010011 +100001011001 +110111100100 +100110011011 +101000000100 +111110100001 +100011000101 +010010001111 +010011111000 +101000100001 +000011011010 +011100101010 +101110000110 +000011111110 +010101011010 +110101010100 +101010010110 +111101110100 +101100011001 +011101101111 +001101011001 +000010101010 +001110101101 +000011110010 +101011000011 +001011110011 +101101001010 +011101001100 +111011001010 +111010001000 +010111101000 +010100100101 +000000011110 +011000011110 +011101011010 +101000101010 +111001011100 +000110110100 +010110100110 +100011100110 +100111010011 +001010111000 +101001110100 +111011011111 +001010000000 +101001011111 +010110110011 +010100100010 +011011001000 +101111011001 +000101010010 +000000110110 +011110101110 +011010111011 +110011100101 +000111101000 +110101100111 +101100001100 +110110110010 +000000100011 +010011011111 +110000111110 +111110101010 +100001001011 +001111101010 +000100000001 +001111110101 +101010001011 +111111001111 +011101001011 +101111001101 +011111011010 +011101101110 +111111000001 +110111110001 +101110010110 +101101000110 +101101001100 +001011110111 +101000001000 +010101111001 +111011010111 +010010010110 +011010001000 +011000101000 +101101010101 +110101000001 +111111001000 +111011001101 +100100010111 +111101010000 +111001011111 +011100110001 +010101011110 +101010111010 +010110101111 +100010011000 +110110011001 +010010000011 +101011101110 +011001111000 +101110101011 +111101001001 +010110010001 +011101011011 +001001000100 +111101011011 +111111010110 +010010000110 +000111110001 +011001101110 +010100111100 +100001101000 +111010010000 +110010110010 +111001100011 +011111100000 +100100000011 +111101101110 +110000001101 +010111110111 +111111100001 +001111100110 +010001001100 +001110001101 +000110010101 +101000101011 +001001111100 +101011011111 +010100110010 +100010011011 +000111000101 +111011011101 +110100100000 +110110011111 +001111110011 +100000000110 +101110001011 +000001110110 +011100010000 +110111100101 +011101100100 +000101000100 +011010100100 +101001101001 +011101101100 +110011111011 +001010001011 +011110110110 +100000111011 +010000100010 +001100010101 +010001110101 +101100000010 +101000101001 +010010010101 +101101001101 +001101000111 +111110001100 +101010100100 +011100111100 +000011010110 +011101100010 +001000111010 +001001000101 +011110101011 +100111110111 +111001000011 +101100100000 +100110100010 +101001011101 +010011111111 +100111001010 +001100101110 +110111100011 +101100110100 +010101010111 +110110111110 +010010101111 +000000000001 +000100001000 +101011100011 +101100001000 +101011100111 +110100111111 +101011100100 +000100000110 +101011000010 +011101010100 +111110111101 +110001100110 +011110100011 +110100110101 +011000100010 +000001100101 +010111001001 +001000011011 +000100111011 +100010100010 +011011000000 +111111010101 +100011111011 +011101110111 +111000011011 +111010000111 +011010111001 +110010101101 +110111001100 +111000001100 +011101010110 +110010001010 +010100110110 +111011011011 +000010111100 +010001001101 +110010100010 +011010001110 +110100001100 +100011100010 +000101110011 +110111110111 +101110110001 +111101111111 +111100100101 +011110011110 +100000111001 +100001010100 +111001001110 +111000000011 +001010100111 +011000101110 +111011101100 +100011100000 +110010000010 +001100110011 +001100111001 +101000011011 +101100001101 +000100001010 +001110000000 +101011011001 +011000001110 +111010001111 +100001101111 +010110100100 +001111110010 +000111100010 +111011100111 +110111101010 +000101110110 +010111101001 +011000110001 +100010110000 +011000010111 +100111111010 +001100110010 +000111010010 +101010000111 +100101100001 +100000101010 +101011000101 +100110011010 +100111010101 +101001000100 +100011010011 +010111110110 +011001101010 +100111100011 +000001010110 +110001110011 +010101010100 +100000001000 +000100100001 +100011001110 +001001000011 +110110100101 +110011111010 +010110110001 +000011000110 +000101111000 +111011001110 +010010001100 +111011000111 +000101110001 +011110011101 +110101111100 +000010101000 +110110010111 +001101100000 +100110010010 +001011100101 +011001001110 +110011111110 +000000010011 +011011100001 +000010101111 +110111110101 +101001001000 +110010011100 +110000111111 +110000000001 +101010100010 +100101010000 +111110111001 +010000010101 +100100010000 +000000011111 +011011110011 +010001110111 +100100011111 +011110101001 +110001000111 +010100010100 +011111001111 +110010010110 +101110110111 +110101001010 +011100010101 +000100000011 +111001011001 +001000111001 +001001110111 +111000100111 +010011100001 +010110001010 +001000101110 +011011000100 +001011111111 +000000110011 +101101101001 +001100111010 +110010111111 +010111011010 +001001011100 +001101101101 +110110110101 +011110101000 +101001010110 +111010101101 +000101101111 +100010111000 +010101111110 +111111001100 +100101110100 +001111111111 +101101000001 +100000101101 +011010001010 +110000100000 +111100100011 +101010010101 +010100100111 +010000010110 +110001011100 +010110001111 +111101000001 +110011010001 +011011000110 +011111001101 +001100000011 +010001011000 +010110111100 +010010101100 +000101000010 +011010100110 +001111110110 +011100101100 +110011001001 +110011000110 +010011110011 +001011100000 +110100000010 +110001100010 +110101001110 +001000111101 +111110101111 +100010111010 +011101001001 +000111111101 +000101101011 +100001110000 +010111110101 +110001101111 +000100110011 +111100111000 +001000110000 +100111110011 +101000111011 +101100101001 +001011001001 +010101001101 +000011101110 +011001111111 +011011111100 +010011100010 +010001000100 +111101000100 +011111000010 +001100110101 +110011111100 +000000000111 +000010001111 +101000111100 +101110001111 +011101000001 +000101011111 +000001001001 +011111101010 +100110111001 +000111110010 +011100111011 +000111011000 +001001000111 +100001010001 +000100011000 +010011100011 +011111101111 +010101110101 +101000110000 +101011011000 +001101100100 +000111011100 +101111001011 +100011010110 +010101100100 +111001010111 +000000100101 +010001010111 +111010100110 +111110010010 +011101011110 +101100101010 +100111111111 +010010100001 +010011100100 +100101010011 +000110001110 +010010001110 +010110010010 +101001101000 +010011110010 +011111010111 +111101101000 +110100011101 +000001001000 +110010100101 +111001001011 +111001111001 +110110011101 +000110001001 +101111000011 +110101111010 +001001101100 +101110111101 +100000011110 +011001001011 +110111101000 +000010010010 +011000111111 +001100101100 +111100000000 +101100100101 +010000111001 +000001010001 +101000111000 +111001100000 +000011011111 +111100100010 +000010010011 +001000110111 +011101110110 +011010110101 +011000011000 +100101111010 +001100111110 +110110111101 +111011001100 +000000000110 +110101000011 +011010001001 +011111001001 +101101010000 +101101111010 +100101000111 +011100011011 +101110111111 +101111111000 +011101001101 +000110100110 +110000110000 +110111011010 +010011011001 +000011111001 +110110100001 +110001010011 +101010010010 +111101110101 +110100110001 +001010110010 +110111000000 +001010100000 +111110110111 +111100101101 +100111110000 +111000001111 +010100000010 +000111001011 +001110001100 +100100110011 +000010100010 +011111001110 +001111011100 +111110011001 +010010110011 +110011011001 +100011110010 diff --git a/2021/inputs/day4.txt b/2021/inputs/day4.txt new file mode 100644 index 0000000..563c8e1 --- /dev/null +++ b/2021/inputs/day4.txt @@ -0,0 +1,601 @@ +46,12,57,37,14,78,31,71,87,52,64,97,10,35,54,36,27,84,80,94,99,22,0,11,30,44,86,59,66,7,90,21,51,53,92,8,76,41,39,77,42,88,29,24,60,17,68,13,79,67,50,82,25,61,20,16,6,3,81,19,85,9,28,56,75,96,2,26,1,62,33,63,32,73,18,48,43,65,98,5,91,69,47,4,38,23,49,34,55,83,93,45,72,95,40,15,58,74,70,89 + +37 72 60 35 89 +32 49 4 77 82 +30 26 27 63 88 +29 43 16 34 58 +48 33 96 79 94 + +41 94 77 43 87 + 2 17 82 96 25 +95 49 32 12 9 +59 33 67 71 64 +88 54 93 85 30 + +78 84 73 64 81 + 6 66 54 21 15 +72 88 69 5 93 +11 96 38 95 44 +13 41 94 55 48 + + 5 14 2 82 33 +56 26 0 84 92 + 8 95 24 54 25 +68 67 15 85 47 +20 91 36 13 88 + +39 26 33 65 32 +78 72 80 51 0 +35 64 60 18 31 +93 59 83 54 74 +86 5 9 98 69 + + 0 8 20 18 70 + 5 29 65 21 57 +68 61 83 63 51 +91 73 77 75 80 +35 62 16 32 10 + +51 78 58 67 93 +50 14 99 5 31 + 6 21 48 30 83 +22 33 23 1 34 + 2 72 57 54 42 + +15 68 4 24 49 +12 9 74 88 51 +91 19 50 76 75 +80 84 23 17 53 +67 42 22 85 36 + +41 78 11 69 9 +90 25 98 65 77 +97 53 37 84 89 +58 63 5 55 1 +24 10 74 20 82 + +42 19 95 89 49 +61 31 50 76 3 +34 47 32 69 86 +78 68 99 11 91 +55 12 73 45 23 + +24 53 95 64 14 +40 29 71 57 97 +62 70 25 22 2 +88 68 33 82 59 +72 38 76 78 43 + +73 36 84 90 40 +16 4 57 9 29 +38 97 46 51 83 +86 88 99 44 32 +54 49 37 43 62 + +18 66 17 49 27 +24 93 91 87 72 +54 37 77 43 10 +88 80 60 15 79 +47 68 12 2 69 + + 9 23 13 57 68 +38 97 63 88 98 +96 62 65 82 58 +61 83 29 47 40 +21 86 20 16 56 + +27 90 37 97 52 +14 96 76 21 79 + 0 43 63 81 56 +42 62 23 55 74 +45 72 77 44 47 + + 8 78 63 24 87 + 9 23 12 17 68 +36 83 45 61 50 +84 77 18 86 37 +31 26 19 49 94 + +72 84 59 48 40 +92 98 35 1 80 +83 15 85 63 39 + 2 64 58 13 20 +29 88 60 12 74 + +21 94 52 6 4 +89 70 39 23 64 +96 87 31 54 14 +88 35 83 13 56 +84 10 98 48 68 + +70 33 48 21 37 +91 95 65 38 77 +92 14 26 96 60 +12 6 73 13 81 +54 55 2 45 80 + +60 11 67 95 28 + 5 32 0 71 12 +47 78 13 54 43 +49 89 82 66 77 +26 53 19 79 3 + +81 9 53 72 29 +56 35 60 44 45 +42 94 96 88 64 +15 92 4 6 14 +97 11 17 61 63 + +24 43 33 9 34 +36 28 69 35 7 +47 4 14 82 38 +11 1 52 0 49 +93 87 98 41 5 + +37 79 99 34 77 +38 26 25 95 70 +28 78 40 33 86 +41 57 96 10 24 + 9 74 72 50 81 + +18 96 52 29 61 +38 90 1 48 51 +78 11 27 55 97 +33 21 87 93 67 +79 46 94 45 2 + +27 63 6 90 10 + 3 60 24 5 89 +78 72 76 54 8 +33 22 87 51 58 + 4 37 64 91 43 + +63 73 87 80 89 +29 14 95 48 3 +71 55 69 9 67 +30 99 19 2 86 +26 72 88 85 37 + +12 57 81 78 40 +35 4 55 15 39 +33 45 25 60 70 +86 79 88 52 3 +90 20 28 59 85 + +92 51 98 47 99 +41 78 65 4 46 +19 87 39 89 17 +12 23 36 29 44 + 6 82 71 16 37 + + 8 34 81 67 80 +83 92 13 11 41 +39 89 93 49 43 +20 69 3 74 76 +44 72 68 70 45 + +66 39 94 98 28 +72 4 25 77 76 +56 41 84 59 40 +36 87 18 44 73 +29 45 79 55 95 + +45 91 2 92 16 +21 47 86 81 56 +31 11 62 5 95 +39 1 30 65 33 +42 60 17 18 83 + +86 11 77 30 43 +51 88 73 98 94 +72 63 38 56 10 +57 92 49 7 41 +79 75 34 23 54 + +56 95 3 43 65 +39 62 93 19 27 +61 41 99 96 52 + 4 92 77 98 70 +16 54 11 17 57 + + 6 63 10 71 58 +64 70 50 92 0 + 7 14 99 45 26 +78 17 44 46 73 +77 38 62 53 37 + +31 82 67 55 27 +57 58 84 6 15 +14 41 49 8 85 +12 32 91 42 19 +23 1 87 54 29 + +54 60 43 26 4 +78 17 28 67 5 +87 93 90 71 22 +13 30 16 21 85 +55 74 52 1 29 + +50 16 70 32 33 + 6 94 52 66 22 +97 64 98 72 39 +27 69 99 34 26 +36 91 37 21 14 + + 7 97 64 28 18 +85 80 14 37 34 +72 1 22 58 73 +53 3 68 17 0 +29 44 56 95 32 + +30 66 93 24 92 +48 80 79 86 27 +89 13 62 94 81 +70 65 61 8 54 +96 97 20 90 34 + +87 76 4 7 43 +92 55 80 25 62 +79 6 88 35 30 +10 32 5 45 17 +36 27 33 68 63 + +72 69 27 88 41 +34 53 42 84 3 +58 18 22 66 65 + 9 47 85 12 62 +73 90 91 57 33 + +67 16 50 58 52 +68 70 84 98 69 + 4 72 9 64 0 +93 97 39 26 5 + 3 37 79 7 82 + +61 57 88 54 70 +77 8 94 81 63 +39 48 18 13 10 +55 23 27 4 73 + 3 5 64 0 96 + +62 27 0 52 19 +28 57 83 25 41 + 5 59 24 33 80 +37 85 2 86 43 +22 94 50 8 20 + +54 32 34 47 87 +71 22 43 85 24 +11 68 58 36 46 +35 56 61 67 18 +70 23 72 5 59 + + 3 96 41 45 32 +68 2 56 28 24 +87 38 40 75 26 +53 64 73 80 81 +54 88 20 6 18 + +64 55 51 96 47 +59 35 49 67 71 +36 91 61 76 68 + 6 94 20 8 27 +60 88 45 7 82 + +87 94 51 91 1 +96 60 28 97 37 +26 27 74 53 35 +88 89 11 77 8 +73 47 18 59 6 + +46 50 19 36 83 +69 28 4 44 70 +45 20 63 27 1 +53 38 9 47 67 +91 31 79 73 86 + +45 3 98 91 60 +40 7 78 34 83 +52 73 59 13 4 +38 15 82 86 79 +42 11 17 20 62 + +65 86 38 20 72 +78 45 73 74 25 +62 42 24 75 3 +81 8 35 50 51 +44 11 94 85 57 + +13 86 55 65 96 +53 18 43 76 20 +41 14 32 52 38 +90 59 80 68 7 + 2 23 92 39 50 + +96 62 85 24 14 +37 5 11 91 45 +61 28 23 34 77 +43 48 20 0 21 +10 35 2 26 97 + +89 5 40 34 84 +90 6 72 68 10 +13 64 71 31 76 +53 60 9 92 62 +69 98 8 50 3 + +17 86 10 75 79 +67 94 78 40 56 +11 85 82 50 46 +53 39 22 9 61 +59 73 72 33 45 + +65 22 18 96 95 +55 86 67 52 69 +10 2 60 83 98 +43 61 87 88 66 +41 24 8 84 33 + +31 53 98 70 91 +33 34 48 83 9 +40 39 29 71 65 +69 10 62 30 4 +52 21 11 93 75 + + 8 94 53 85 89 +13 84 58 59 29 +97 7 21 25 96 +45 54 34 22 63 +37 17 49 68 67 + +86 87 84 24 10 +82 32 36 59 50 + 8 62 79 71 43 +49 23 85 69 58 +21 66 42 25 56 + +65 88 43 25 19 +26 36 63 5 6 +37 54 75 1 38 +95 46 83 66 28 + 4 90 80 99 85 + +78 83 7 77 34 +27 92 93 96 82 +40 95 52 32 43 +17 28 69 41 85 +21 65 39 58 19 + +11 84 28 90 36 +74 4 62 5 46 +22 8 45 40 98 +12 6 30 9 82 +37 2 53 29 41 + +17 65 31 86 57 +73 16 24 67 53 +60 93 88 45 26 +14 80 94 7 44 +55 78 49 8 82 + +95 38 81 25 76 +29 13 83 47 12 +17 69 4 43 28 +63 84 39 52 34 + 1 97 41 88 8 + +70 40 16 83 3 +15 49 20 74 48 +71 30 21 28 84 +29 10 97 1 18 +57 50 63 35 69 + +40 13 67 9 41 +71 76 8 54 24 +15 97 92 49 96 +61 34 23 81 31 +11 38 48 37 86 + +77 36 32 75 7 +38 18 84 26 2 +19 13 99 83 20 +35 51 74 6 27 +71 48 15 66 69 + +91 57 41 3 99 +74 55 81 77 43 +36 52 47 49 45 +85 65 5 38 50 +90 68 70 16 0 + + 1 90 28 86 27 +73 36 67 11 14 +71 31 10 65 55 +78 21 16 69 12 +87 24 33 83 68 + +90 17 10 84 45 + 5 68 69 27 92 + 6 63 98 3 46 +94 48 59 34 43 +39 88 12 33 73 + +12 31 33 98 63 +65 51 94 83 92 +41 38 84 91 66 +47 28 76 54 3 +48 36 11 13 27 + +51 84 96 16 8 +64 26 74 30 48 +29 41 68 97 87 + 9 38 1 15 39 +98 3 45 53 14 + +53 70 90 95 86 +35 22 85 45 66 +93 0 83 30 88 +64 57 68 36 3 + 5 51 19 20 89 + + 9 36 69 46 44 +37 7 99 57 45 +79 10 86 58 30 +49 98 52 90 27 +14 51 88 60 81 + +73 97 91 19 48 +76 43 18 83 67 +62 9 11 82 55 +24 17 33 53 22 +75 8 56 1 21 + +27 97 53 0 89 +30 70 3 80 54 +56 93 40 64 35 +46 82 1 44 65 + 6 59 45 32 34 + +87 58 73 45 69 +24 49 89 71 83 +94 6 53 68 50 +28 25 88 47 0 +36 13 31 18 55 + +52 63 37 66 9 +34 77 57 6 55 +85 80 97 78 74 +95 75 67 96 29 +22 73 92 69 47 + +79 97 80 36 73 +38 77 35 32 53 + 2 37 29 6 89 +78 91 15 47 34 +11 52 64 84 0 + +69 30 21 99 46 +72 4 15 25 42 +67 98 81 91 63 +70 20 57 65 14 + 0 78 19 8 87 + +20 4 98 33 85 +76 17 94 65 35 +95 69 72 52 71 +23 25 50 38 27 +43 49 96 53 99 + +16 27 34 65 36 +10 40 84 60 82 +80 2 54 67 70 +52 94 79 17 56 + 5 14 77 91 88 + +32 90 50 66 39 +30 16 14 20 10 + 4 42 88 59 12 +75 84 54 51 48 +33 24 13 89 43 + +78 42 34 65 51 +75 72 3 99 61 +15 50 59 8 89 +71 18 9 54 53 +43 39 97 56 19 + +50 43 83 4 30 +89 97 58 35 39 +11 24 61 41 25 +87 99 93 15 34 +31 57 3 45 44 + +70 21 63 24 38 +34 23 88 7 51 +43 18 76 46 49 +60 78 47 8 12 +11 66 98 25 74 + +30 17 23 10 92 +12 85 69 81 91 +47 80 28 29 58 +73 44 77 50 32 +76 54 78 75 60 + +71 53 86 48 98 +90 37 79 8 56 +99 42 97 36 15 +31 85 34 10 40 +43 89 57 72 51 + +48 0 65 55 90 +45 76 69 97 4 +42 52 46 77 56 +64 62 68 35 72 +71 10 27 30 16 + +41 69 63 88 57 +25 56 23 78 80 + 8 92 59 66 97 +48 61 77 15 14 +87 47 91 12 71 + +51 46 15 2 49 +48 33 23 16 4 +80 41 43 59 83 +62 13 20 63 85 +99 30 7 87 8 + +69 80 96 43 47 +61 75 45 62 15 +32 22 91 83 58 +82 13 50 52 8 +89 20 63 73 14 + +40 2 96 52 73 +25 27 26 43 34 +60 38 80 78 5 +83 63 48 10 66 +97 46 53 74 86 + +46 7 0 69 15 +79 19 85 27 73 +63 45 5 49 54 +93 29 84 28 66 +72 23 99 8 33 + +20 72 85 99 49 +69 0 10 52 23 +88 56 28 67 21 +16 91 83 54 81 +14 73 32 30 59 + +31 52 63 12 3 +96 20 82 6 89 +55 38 8 95 40 + 5 60 84 81 75 +51 14 65 27 61 + +46 93 1 47 76 + 8 98 7 16 63 +44 78 17 14 92 +42 62 20 12 68 +56 3 74 6 21 + + 8 94 11 40 44 +43 92 78 91 18 +75 80 12 54 26 +67 9 45 22 21 +86 1 90 36 30 + +21 19 83 90 8 +50 28 45 65 75 +59 88 25 29 70 +58 23 0 95 49 +36 68 76 78 66 + +77 28 43 56 97 +73 71 8 72 46 +23 25 70 69 41 +90 17 34 67 48 +32 75 81 63 21 diff --git a/2021/inputs/day6.txt b/2021/inputs/day6.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day7.txt b/2021/inputs/day7.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day8.txt b/2021/inputs/day8.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/inputs/day9.txt b/2021/inputs/day9.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day1.txt b/2021/tests/day1.txt new file mode 100644 index 0000000..167e291 --- /dev/null +++ b/2021/tests/day1.txt @@ -0,0 +1,10 @@ +199 +200 +208 +210 +200 +207 +240 +269 +260 +263 diff --git a/2021/tests/day10.txt b/2021/tests/day10.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day11.txt b/2021/tests/day11.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day12.txt b/2021/tests/day12.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day13.txt b/2021/tests/day13.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day14.txt b/2021/tests/day14.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day15.txt b/2021/tests/day15.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day16.txt b/2021/tests/day16.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day17.txt b/2021/tests/day17.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day18.txt b/2021/tests/day18.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day19.txt b/2021/tests/day19.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day2.txt b/2021/tests/day2.txt new file mode 100644 index 0000000..b7172ac --- /dev/null +++ b/2021/tests/day2.txt @@ -0,0 +1,6 @@ +forward 5 +down 5 +forward 8 +up 3 +down 8 +forward 2 diff --git a/2021/tests/day20.txt b/2021/tests/day20.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day21.txt b/2021/tests/day21.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day22.txt b/2021/tests/day22.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day23.txt b/2021/tests/day23.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day24.txt b/2021/tests/day24.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day25.txt b/2021/tests/day25.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day3.txt b/2021/tests/day3.txt new file mode 100644 index 0000000..a6366a8 --- /dev/null +++ b/2021/tests/day3.txt @@ -0,0 +1,12 @@ +00100 +11110 +10110 +10111 +10101 +01111 +00111 +11100 +10000 +11001 +00010 +01010 diff --git a/2021/tests/day4.txt b/2021/tests/day4.txt new file mode 100644 index 0000000..669a51d --- /dev/null +++ b/2021/tests/day4.txt @@ -0,0 +1,19 @@ +7,4,9,5,11,17,23,2,0,14,21,24,10,16,13,6,15,25,12,22,18,20,8,19,3,26,1 + +22 13 17 11 0 + 8 2 23 4 24 +21 9 14 16 7 + 6 10 3 18 5 + 1 12 20 15 19 + + 3 15 0 2 22 + 9 18 13 17 5 +19 8 7 25 23 +20 11 10 24 4 +14 21 16 12 6 + +14 21 17 24 4 +10 16 15 9 19 +18 8 23 26 20 +22 11 13 6 5 + 2 0 12 3 7 diff --git a/2021/tests/day5.txt b/2021/tests/day5.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day6.txt b/2021/tests/day6.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day7.txt b/2021/tests/day7.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day8.txt b/2021/tests/day8.txt new file mode 100644 index 0000000..e69de29 diff --git a/2021/tests/day9.txt b/2021/tests/day9.txt new file mode 100644 index 0000000..e69de29