diff --git a/src/Year_2022/Day01.py b/src/Year_2022/Day01.py new file mode 100644 index 0000000..65e2975 --- /dev/null +++ b/src/Year_2022/Day01.py @@ -0,0 +1,98 @@ +# --- Day 1: Calorie Counting --- + +# Santa's reindeer typically eat regular reindeer food, but they need a lot of +# magical energy to deliver presents on Christmas. For that, their favorite +# snack is a special type of star fruit that only grows deep in the jungle. The +# Elves have brought you on their annual expedition to the grove where the +# fruit grows. + +# To supply enough magical energy, the expedition needs to retrieve a minimum +# of fifty stars by December 25th. Although the Elves assure you that the grove +# has plenty of fruit, you decide to grab any fruit you see along the way, just +# in case. + +# Collect stars by solving puzzles. Two puzzles will be made available on each +# day in the Advent calendar; the second puzzle is unlocked when you complete +# the first. Each puzzle grants one star. Good luck! + +# The jungle must be too overgrown and difficult to navigate in vehicles or +# access from the air; the Elves' expedition traditionally goes on foot. As +# your boats approach land, the Elves begin taking inventory of their supplies. +# One important consideration is food - in particular, the number of Calories +# each Elf is carrying (your puzzle input). + +# The Elves take turns writing down the number of Calories contained by the +# various meals, snacks, rations, etc. that they've brought with them, one item +# per line. Each Elf separates their own inventory from the previous Elf's +# inventory (if any) by a blank line. + +# For example, suppose the Elves finish writing their items' Calories and end +# up with the following list: + +# 1000 +# 2000 +# 3000 + +# 4000 + +# 5000 +# 6000 + +# 7000 +# 8000 +# 9000 + +# 10000 + +# This list represents the Calories of the food carried by five Elves: + +# The first Elf is carrying food with 1000, 2000, and 3000 Calories, a +# total of 6000 Calories. +# The second Elf is carrying one food item with 4000 Calories. +# The third Elf is carrying food with 5000 and 6000 Calories, a total of +# 11000 Calories. +# The fourth Elf is carrying food with 7000, 8000, and 9000 Calories, a +# total of 24000 Calories. +# The fifth Elf is carrying one food item with 10000 Calories. + +# In case the Elves get hungry and need extra snacks, they need to know which +# Elf to ask: they'd like to know how many Calories are being carried by the +# Elf carrying the most Calories. In the example above, this is 24000 (carried +# by the fourth Elf). + +# Find the Elf carrying the most Calories. How many total Calories is that Elf +# carrying? + +from collections import Counter + +with open("P1.txt") as f: + cal_list = [line for line in f.read().strip().split("\n\n")] + +elfs = Counter() +for idx, elf in enumerate(cal_list): + elfs[idx] = sum([int(food) for food in elf.split("\n")]) + +print(elfs.most_common(1)) + +# --- Part Two --- + +# By the time you calculate the answer to the Elves' question, they've already +# realized that the Elf carrying the most Calories of food might eventually run +# out of snacks. + +# To avoid this unacceptable situation, the Elves would instead like to know +# the total Calories carried by the top three Elves carrying the most Calories. +# That way, even if one of those Elves runs out of snacks, they still have two +# backups. + +# In the example above, the top three Elves are the fourth Elf (with 24000 +# Calories), then the third Elf (with 11000 Calories), then the fifth Elf (with +# 10000 Calories). The sum of the Calories carried by these three elves is +# 45000. + +# Find the top three Elves carrying the most Calories. How many Calories are +# those Elves carrying in total? + +top_three = elfs.most_common(3) + +print(sum(cals for elf, cals in top_three)) diff --git a/src/Year_2022/Day02.py b/src/Year_2022/Day02.py new file mode 100644 index 0000000..c24d0f0 --- /dev/null +++ b/src/Year_2022/Day02.py @@ -0,0 +1,110 @@ +# --- Day 2: Rock Paper Scissors --- + +# The Elves begin to set up camp on the beach. To decide whose tent gets to be +# closest to the snack storage, a giant Rock Paper Scissors tournament is +# already in progress. + +# Rock Paper Scissors is a game between two players. Each game contains many +# rounds; in each round, the players each simultaneously choose one of Rock, +# Paper, or Scissors using a hand shape. Then, a winner for that round is +# selected: Rock defeats Scissors, Scissors defeats Paper, and Paper defeats +# Rock. If both players choose the same shape, the round instead ends in a +# draw. + +# Appreciative of your help yesterday, one Elf gives you an encrypted strategy +# guide (your puzzle input) that they say will be sure to help you win. "The +# first column is what your opponent is going to play: A for Rock, B for Paper, +# and C for Scissors. The second column--" Suddenly, the Elf is called away to +# help with someone's tent. + +# The second column, you reason, must be what you should play in response: X +# for Rock, Y for Paper, and Z for Scissors. Winning every time would be +# suspicious, so the responses must have been carefully chosen. + +# The winner of the whole tournament is the player with the highest score. Your +# total score is the sum of your scores for each round. The score for a single +# round is the score for the shape you selected (1 for Rock, 2 for Paper, and 3 +# for Scissors) plus the score for the outcome of the round (0 if you lost, 3 +# if the round was a draw, and 6 if you won). + +# Since you can't be sure if the Elf is trying to help you or trick you, you +# should calculate the score you would get if you were to follow the strategy +# guide. + +# For example, suppose you were given the following strategy guide: + +# A Y +# B X +# C Z + +# This strategy guide predicts and recommends the following: + +# In the first round, your opponent will choose Rock (A), and you should +# choose Paper (Y). This ends in a win for you with a score of 8 (2 because you +# chose Paper + 6 because you won). +# In the second round, your opponent will choose Paper (B), and you should +# choose Rock (X). This ends in a loss for you with a score of 1 (1 + 0). +# The third round is a draw with both players choosing Scissors, giving you +# a score of 3 + 3 = 6. + +# In this example, if you were to follow the strategy guide, you would get a +# total score of 15 (8 + 1 + 6). + +# What would your total score be if everything goes exactly according to your +# strategy guide? + +game_score_dic = { + "A": {"X": 3 + 1, "Y": 6 + 2, "Z": 0 + 3}, + "B": {"X": 0 + 1, "Y": 3 + 2, "Z": 6 + 3}, + "C": {"X": 6 + 1, "Y": 0 + 2, "Z": 3 + 3}, +} + +with open("P2.txt") as f: + strategy_list = [line for line in f.read().strip().split("\n")] + +score_dic = 0 +for game in strategy_list: + p1, p2 = game.split() + score_dic += game_score_dic[p1][p2] + + +print(score_dic) + + +# --- Part Two --- + +# The Elf finishes helping with the tent and sneaks back over to you. "Anyway, +# the second column says how the round needs to end: X means you need to lose, +# Y means you need to end the round in a draw, and Z means you need to win. +# Good luck!" + +# The total score is still calculated in the same way, but now you need to +# figure out what shape to choose so the round ends as indicated. The example +# above now goes like this: + +# In the first round, your opponent will choose Rock (A), and you need the +# round to end in a draw (Y), so you also choose Rock. This gives you a score +# of 1 + 3 = 4. +# In the second round, your opponent will choose Paper (B), and you choose +# Rock so you lose (X) with a score of 1 + 0 = 1. +# In the third round, you will defeat your opponent's Scissors with Rock +# for a score of 1 + 6 = 7. + +# Now that you're correctly decrypting the ultra top secret strategy guide, you +# would get a total score of 12. + +# Following the Elf's instructions for the second column, what would your total +# score be if everything goes exactly according to your strategy guide? + +game_score_2nd_dic = { + "A": {"X": 0 + 3, "Y": 3 + 1, "Z": 6 + 2}, + "B": {"X": 0 + 1, "Y": 3 + 2, "Z": 6 + 3}, + "C": {"X": 0 + 2, "Y": 3 + 3, "Z": 6 + 1}, +} + +score_2nd = 0 +for game in strategy_list: + p1, p2 = game.split() + score_2nd += game_score_2nd_dic[p1][p2] + +print(score_2nd) diff --git a/src/Year_2022/Day03.py b/src/Year_2022/Day03.py new file mode 100644 index 0000000..00d9c90 --- /dev/null +++ b/src/Year_2022/Day03.py @@ -0,0 +1,128 @@ +# --- Day 3: Rucksack Reorganization --- + +# One Elf has the important job of loading all of the rucksacks with supplies +# for the jungle journey. Unfortunately, that Elf didn't quite follow the +# packing instructions, and so a few items now need to be rearranged. + +# Each rucksack has two large compartments. All items of a given type are meant +# to go into exactly one of the two compartments. The Elf that did the packing +# failed to follow this rule for exactly one item type per rucksack. + +# The Elves have made a list of all of the items currently in each rucksack +# (your puzzle input), but they need your help finding the errors. Every item +# type is identified by a single lowercase or uppercase letter (that is, a and +# A refer to different types of items). + +# The list of items for each rucksack is given as characters all on a single +# line. A given rucksack always has the same number of items in each of its two +# compartments, so the first half of the characters represent items in the +# first compartment, while the second half of the characters represent items in +# the second compartment. + +# For example, suppose you have the following list of contents from six +# rucksacks: + +# vJrwpWtwJgWrhcsFMMfFFhFp +# jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL +# PmmdzqPrVvPwwTWBwg +# wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn +# ttgJtRGJQctTZtZT +# CrZsJsPPZsGzwwsLwLmpwMDw + +# The first rucksack contains the items vJrwpWtwJgWrhcsFMMfFFhFp, which +# means its first compartment contains the items vJrwpWtwJgWr, while the second +# compartment contains the items hcsFMMfFFhFp. The only item type that appears +# in both compartments is lowercase p. +# The second rucksack's compartments contain jqHRNqRjqzjGDLGL and +# rsFMfFZSrLrFZsSL. The only item type that appears in both compartments is +# uppercase L. +# The third rucksack's compartments contain PmmdzqPrV and vPwwTWBwg; the +# only common item type is uppercase P. +# The fourth rucksack's compartments only share item type v. +# The fifth rucksack's compartments only share item type t. +# The sixth rucksack's compartments only share item type s. + +# To help prioritize item rearrangement, every item type can be converted to a +# priority: + +# Lowercase item types a through z have priorities 1 through 26. +# Uppercase item types A through Z have priorities 27 through 52. + +# In the above example, the priority of the item type that appears in both +# compartments of each rucksack is 16 (p), 38 (L), 42 (P), 22 (v), 20 (t), and +# 19 (s); the sum of these is 157. + +# Find the item type that appears in both compartments of each rucksack. What +# is the sum of the priorities of those item types? + +with open("P3.txt") as f: + items_list = [line for line in f.read().strip().split()] + +priorities = 0 +for items in items_list: + first, second = items[: len(items) // 2], items[len(items) // 2 :] + char = list(set(first) & set(second))[0] + if char.isupper(): + priorities += ord(char) - 38 + else: + priorities += ord(char) - 96 + +print(priorities) + +# --- Part Two --- + +# As you finish identifying the misplaced items, the Elves come to you with +# another issue. + +# For safety, the Elves are divided into groups of three. Every Elf carries a +# badge that identifies their group. For efficiency, within each group of three +# Elves, the badge is the only item type carried by all three Elves. That is, +# if a group's badge is item type B, then all three Elves will have item type B +# somewhere in their rucksack, and at most two of the Elves will be carrying +# any other item type. + +# The problem is that someone forgot to put this year's updated authenticity +# sticker on the badges. All of the badges need to be pulled out of the +# rucksacks so the new authenticity stickers can be attached. + +# Additionally, nobody wrote down which item type corresponds to each group's +# badges. The only way to tell which item type is the right one is by finding +# the one item type that is common between all three Elves in each group. + +# Every set of three lines in your list corresponds to a single group, but each +# group can have a different badge item type. So, in the above example, the +# first group's rucksacks are the first three lines: + +# vJrwpWtwJgWrhcsFMMfFFhFp +# jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL +# PmmdzqPrVvPwwTWBwg + +# And the second group's rucksacks are the next three lines: + +# wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn +# ttgJtRGJQctTZtZT +# CrZsJsPPZsGzwwsLwLmpwMDw + +# In the first group, the only item type that appears in all three rucksacks is +# lowercase r; this must be their badges. In the second group, their badge item +# type must be Z. + +# Priorities for these items must still be found to organize the sticker +# attachment efforts: here, they are 18 (r) for the first group and 52 (Z) for +# the second group. The sum of these is 70. + +# Find the item type that corresponds to the badges of each three-Elf group. +# What is the sum of the priorities of those item types? + +from more_itertools import grouper + +new_priorities = 0 +for triplet in grouper(items_list, 3): + first, second, third = triplet + char = list(set(first) & set(second) & set(third))[0] + if char.isupper(): + new_priorities += ord(char) - 38 + else: + new_priorities += ord(char) - 96 + +print(new_priorities) diff --git a/src/Year_2022/Day04.py b/src/Year_2022/Day04.py new file mode 100644 index 0000000..ecce3a8 --- /dev/null +++ b/src/Year_2022/Day04.py @@ -0,0 +1,104 @@ +# --- Day 4: Camp Cleanup --- + +# Space needs to be cleared before the last supplies can be unloaded from the +# ships, and so several Elves have been assigned the job of cleaning up +# sections of the camp. Every section has a unique ID number, and each Elf is +# assigned a range of section IDs. + +# However, as some of the Elves compare their section assignments with each +# other, they've noticed that many of the assignments overlap. To try to +# quickly find overlaps and reduce duplicated effort, the Elves pair up and +# make a big list of the section assignments for each pair (your puzzle input). + +# For example, consider the following list of section assignment pairs: + +# 2-4,6-8 +# 2-3,4-5 +# 5-7,7-9 +# 2-8,3-7 +# 6-6,4-6 +# 2-6,4-8 + +# For the first few pairs, this list means: + +# Within the first pair of Elves, the first Elf was assigned sections 2-4 +# (sections 2, 3, and 4), while the second Elf was assigned sections 6-8 +# (sections 6, 7, 8). +# The Elves in the second pair were each assigned two sections. +# The Elves in the third pair were each assigned three sections: one got +# sections 5, 6, and 7, while the other also got 7, plus 8 and 9. + +# This example list uses single-digit section IDs to make it easier to draw; +# your actual list might contain larger numbers. Visually, these pairs of +# section assignments look like this: + +# .234..... 2-4 +# .....678. 6-8 + +# .23...... 2-3 +# ...45.... 4-5 + +# ....567.. 5-7 +# ......789 7-9 + +# .2345678. 2-8 +# ..34567.. 3-7 + +# .....6... 6-6 +# ...456... 4-6 + +# .23456... 2-6 +# ...45678. 4-8 + +# Some of the pairs have noticed that one of their assignments fully contains +# the other. For example, 2-8 fully contains 3-7, and 6-6 is fully contained by +# 4-6. In pairs where one assignment fully contains the other, one Elf in the +# pair would be exclusively cleaning sections their partner will already be +# cleaning, so these seem like the most in need of reconsideration. In this +# example, there are 2 such pairs. + +# In how many assignment pairs does one range fully contain the other? + +with open("P4.txt") as f: + section_pairs = [line for line in f.read().strip().split()] + +assignment_pairs = 0 +for elfs in section_pairs: + e1, e2 = [[int(x) for x in pairs.split("-")] for pairs in elfs.split(",")] + e1, e2 = {x for x in range(e1[0], e1[1] + 1)}, { + x for x in range(e2[0], e2[1] + 1) + } + if len(e1) == len(e1 | e2) or len(e2) == len(e1 | e2): + assignment_pairs += 1 + +print(assignment_pairs) + + +# --- Part Two --- + +# It seems like there is still quite a bit of duplicate work planned. Instead, +# the Elves would like to know the number of pairs that overlap at all. + +# In the above example, the first two pairs (2-4,6-8 and 2-3,4-5) don't +# overlap, while the remaining four pairs (5-7,7-9, 2-8,3-7, 6-6,4-6, and +# 2-6,4-8) do overlap: + +# 5-7,7-9 overlaps in a single section, 7. +# 2-8,3-7 overlaps all of the sections 3 through 7. +# 6-6,4-6 overlaps in a single section, 6. +# 2-6,4-8 overlaps in sections 4, 5, and 6. + +# So, in this example, the number of overlapping assignment pairs is 4. + +# In how many assignment pairs do the ranges overlap? + +assignment_pairs_overlaps = len(section_pairs) +for elfs in section_pairs: + e1, e2 = [[int(x) for x in pairs.split("-")] for pairs in elfs.split(",")] + e1, e2 = {x for x in range(e1[0], e1[1] + 1)}, { + x for x in range(e2[0], e2[1] + 1) + } + if len(e1 & e2) == 0: + assignment_pairs_overlaps -= 1 + +print(assignment_pairs_overlaps) diff --git a/src/Year_2022/Day05.py b/src/Year_2022/Day05.py new file mode 100644 index 0000000..79c1693 --- /dev/null +++ b/src/Year_2022/Day05.py @@ -0,0 +1,194 @@ +# --- Day 5: Supply Stacks --- + +# The expedition can depart as soon as the final supplies have been unloaded +# from the ships. Supplies are stored in stacks of marked crates, but because +# the needed supplies are buried under many other crates, the crates need to be +# rearranged. + +# The ship has a giant cargo crane capable of moving crates between stacks. To +# ensure none of the crates get crushed or fall over, the crane operator will +# rearrange them in a series of carefully-planned steps. After the crates are +# rearranged, the desired crates will be at the top of each stack. + +# The Elves don't want to interrupt the crane operator during this delicate +# procedure, but they forgot to ask her which crate will end up where, and they +# want to be ready to unload them as soon as possible so they can embark. + +# They do, however, have a drawing of the starting stacks of crates and the +# rearrangement procedure (your puzzle input). For example: + +# [D] +# [N] [C] +# [Z] [M] [P] +# 1 2 3 + +# move 1 from 2 to 1 +# move 3 from 1 to 3 +# move 2 from 2 to 1 +# move 1 from 1 to 2 + +# In this example, there are three stacks of crates. Stack 1 contains two +# crates: crate Z is on the bottom, and crate N is on top. Stack 2 contains +# three crates; from bottom to top, they are crates M, C, and D. Finally, stack +# 3 contains a single crate, P. + +# Then, the rearrangement procedure is given. In each step of the procedure, a +# quantity of crates is moved from one stack to a different stack. In the first +# step of the above rearrangement procedure, one crate is moved from stack 2 to +# stack 1, resulting in this configuration: + +# [D] +# [N] [C] +# [Z] [M] [P] +# 1 2 3 + +# In the second step, three crates are moved from stack 1 to stack 3. Crates +# are moved one at a time, so the first crate to be moved (D) ends up below the +# second and third crates: + +# [Z] +# [N] +# [C] [D] +# [M] [P] +# 1 2 3 + +# Then, both crates are moved from stack 2 to stack 1. Again, because crates +# are moved one at a time, crate C ends up below crate M: + +# [Z] +# [N] +# [M] [D] +# [C] [P] +# 1 2 3 + +# Finally, one crate is moved from stack 1 to stack 2: + +# [Z] +# [N] +# [D] +# [C] [M] [P] +# 1 2 3 + +# The Elves just need to know which crate will end up on top of each stack; in +# this example, the top crates are C in stack 1, M in stack 2, and Z in stack +# 3, so you should combine these together and give the Elves the message CMZ. + +# After the rearrangement procedure completes, what crate ends up on top of +# each stack? + +from collections import defaultdict + +with open("P5.txt") as f: + stack_crates, instructions = [ + line for line in f.read().strip().split("\n\n") + ] + + +def parse_crates(crates): + stacks = defaultdict(str) + for row in crates.splitlines(): + for idx, char in enumerate(row): + if not char.isalpha(): + continue + stacks[idx // 4 + 1] += char + return stacks + + +def parse_instruction(inst): + procedure = inst.split(" ") + units, from_crate, to_crate = [int(num) for num in procedure[1::2]] + return units, from_crate, to_crate + + +def rearrange(stack, u, f, t): + move = stack[f][:u][::-1] + stack[t] = move + stack[t] + stack[f] = stack[f][u:] + + +stacks = parse_crates(stack_crates) + +# needed for Part 2 +stacks_ = stacks.copy() + +for inst in instructions.splitlines(): + u, f, t = parse_instruction(inst) + rearrange(stacks, u, f, t) + +print("".join([v[0] for k, v in sorted(stacks.items())])) + +# --- Part Two --- + +# As you watch the crane operator expertly rearrange the crates, you notice the +# process isn't following your prediction. + +# Some mud was covering the writing on the side of the crane, and you quickly +# wipe it away. The crane isn't a CrateMover 9000 - it's a CrateMover 9001. + +# The CrateMover 9001 is notable for many new and exciting features: air +# conditioning, leather seats, an extra cup holder, and the ability to pick up +# and move multiple crates at once. + +# Again considering the example above, the crates begin in the same +# configuration: + +# [D] +# [N] [C] +# [Z] [M] [P] +# 1 2 3 + +# Moving a single crate from stack 2 to stack 1 behaves the same as before: + +# [D] +# [N] [C] +# [Z] [M] [P] +# 1 2 3 + +# However, the action of moving three crates from stack 1 to stack 3 means that +# those three moved crates stay in the same order, resulting in this new +# configuration: + +# [D] +# [N] +# [C] [Z] +# [M] [P] +# 1 2 3 + +# Next, as both crates are moved from stack 2 to stack 1, they retain their +# order as well: + +# [D] +# [N] +# [C] [Z] +# [M] [P] +# 1 2 3 + +# Finally, a single crate is still moved from stack 1 to stack 2, but now it's +# crate C that gets moved: + +# [D] +# [N] +# [Z] +# [M] [C] [P] +# 1 2 3 + +# In this example, the CrateMover 9001 has put the crates in a totally +# different order: MCD. + +# Before the rearrangement process finishes, update your simulation so that the +# Elves know where they should stand to be ready to unload the final supplies. +# After the rearrangement procedure completes, what crate ends up on top of +# each stack? + + +def rearrange_9001(stack, u, f, t): + move = stack[f][:u] + stack[t] = move + stack[t] + stack[f] = stack[f][u:] + + +for inst in instructions.splitlines(): + u, f, t = parse_instruction(inst) + rearrange_9001(stacks_, u, f, t) + +print("".join([v[0] for k, v in sorted(stacks_.items())])) diff --git a/src/Year_2022/Day06.py b/src/Year_2022/Day06.py new file mode 100644 index 0000000..6dca334 --- /dev/null +++ b/src/Year_2022/Day06.py @@ -0,0 +1,89 @@ +# --- Day 6: Tuning Trouble --- + +# The preparations are finally complete; you and the Elves leave camp on foot +# and begin to make your way toward the star fruit grove. + +# As you move through the dense undergrowth, one of the Elves gives you a +# handheld device. He says that it has many fancy features, but the most +# important one to set up right now is the communication system. + +# However, because he's heard you have significant experience dealing with +# signal-based systems, he convinced the other Elves that it would be okay to +# give you their one malfunctioning device - surely you'll have no problem +# fixing it. + +# As if inspired by comedic timing, the device emits a few colorful sparks. + +# To be able to communicate with the Elves, the device needs to lock on to +# their signal. The signal is a series of seemingly-random characters that the +# device receives one at a time. + +# To fix the communication system, you need to add a subroutine to the device +# that detects a start-of-packet marker in the datastream. In the protocol +# being used by the Elves, the start of a packet is indicated by a sequence of +# four characters that are all different. + +# The device will send your subroutine a datastream buffer (your puzzle input); +# your subroutine needs to identify the first position where the four most +# recently received characters were all different. Specifically, it needs to +# report the number of characters from the beginning of the buffer to the end +# of the first such four-character marker. + +# For example, suppose you receive the following datastream buffer: + +# mjqjpqmgbljsphdztnvjfqwrcgsmlb + +# After the first three characters (mjq) have been received, there haven't been +# enough characters received yet to find the marker. The first time a marker +# could occur is after the fourth character is received, making the most recent +# four characters mjqj. Because j is repeated, this isn't a marker. + +# The first time a marker appears is after the seventh character arrives. Once +# it does, the last four characters received are jpqm, which are all different. +# In this case, your subroutine should report the value 7, because the first +# start-of-packet marker is complete after 7 characters have been processed. + +# Here are a few more examples: + +# bvwbjplbgvbhsrlpgdmjqwftvncz: first marker after character 5 +# nppdvjthqldpwncqszvftbrmjlhg: first marker after character 6 +# nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg: first marker after character 10 +# zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw: first marker after character 11 + +# How many characters need to be processed before the first start-of-packet +# marker is detected? + +from more_itertools import sliding_window + +with open("P6.txt") as f: + data_stream = [line for line in f.read().strip().split()][0] + +for idx, key in enumerate(sliding_window(data_stream, 4)): + if len(set(key)) == 4: + print(key, idx + 4) + break + +# --- Part Two --- + +# Your device's communication system is correctly detecting packets, but still +# isn't working. It looks like it also needs to look for messages. + +# A start-of-message marker is just like a start-of-packet marker, except it +# consists of 14 distinct characters rather than 4. + +# Here are the first positions of start-of-message markers for all of the above +# examples: + +# mjqjpqmgbljsphdztnvjfqwrcgsmlb: first marker after character 19 +# bvwbjplbgvbhsrlpgdmjqwftvncz: first marker after character 23 +# nppdvjthqldpwncqszvftbrmjlhg: first marker after character 23 +# nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg: first marker after character 29 +# zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw: first marker after character 26 + +# How many characters need to be processed before the first start-of-message +# marker is detected? + +for idx, key in enumerate(sliding_window(data_stream, 14)): + if len(set(key)) == 14: + print(key, idx + 14) + break diff --git a/src/Year_2022/Day07.py b/src/Year_2022/Day07.py new file mode 100644 index 0000000..ebb3cda --- /dev/null +++ b/src/Year_2022/Day07.py @@ -0,0 +1,184 @@ +# --- Day 7: No Space Left On Device --- + +# You can hear birds chirping and raindrops hitting leaves as the expedition +# proceeds. Occasionally, you can even hear much louder sounds in the distance; +# how big do the animals get out here, anyway? + +# The device the Elves gave you has problems with more than just its +# communication system. You try to run a system update: + +# $ system-update --please --pretty-please-with-sugar-on-top +# Error: No space left on device + +# Perhaps you can delete some files to make space for the update? + +# You browse around the filesystem to assess the situation and save the +# resulting terminal output (your puzzle input). For example: + +# $ cd / +# $ ls +# dir a +# 14848514 b.txt +# 8504156 c.dat +# dir d +# $ cd a +# $ ls +# dir e +# 29116 f +# 2557 g +# 62596 h.lst +# $ cd e +# $ ls +# 584 i +# $ cd .. +# $ cd .. +# $ cd d +# $ ls +# 4060174 j +# 8033020 d.log +# 5626152 d.ext +# 7214296 k + +# The filesystem consists of a tree of files (plain data) and directories +# (which can contain other directories or files). The outermost directory is +# called /. You can navigate around the filesystem, moving into or out of +# directories and listing the contents of the directory you're currently in. + +# Within the terminal output, lines that begin with $ are commands you +# executed, very much like some modern computers: + +# cd means change directory. This changes which directory is the current +# directory, but the specific result depends on the argument: +# cd x moves in one level: it looks in the current directory for the +# directory named x and makes it the current directory. +# cd .. moves out one level: it finds the directory that contains the +# current directory, then makes that directory the current directory. +# cd / switches the current directory to the outermost directory, /. +# ls means list. It prints out all of the files and directories +# immediately contained by the current directory: +# 123 abc means that the current directory contains a file named abc +# with size 123. +# dir xyz means that the current directory contains a directory named +# xyz. + +# Given the commands and output in the example above, you can determine that +# the filesystem looks visually like this: + +# - / (dir) +# - a (dir) +# - e (dir) +# - i (file, size=584) +# - f (file, size=29116) +# - g (file, size=2557) +# - h.lst (file, size=62596) +# - b.txt (file, size=14848514) +# - c.dat (file, size=8504156) +# - d (dir) +# - j (file, size=4060174) +# - d.log (file, size=8033020) +# - d.ext (file, size=5626152) +# - k (file, size=7214296) + +# Here, there are four directories: / (the outermost directory), a and d (which +# are in /), and e (which is in a). These directories also contain files of +# various sizes. + +# Since the disk is full, your first step should probably be to find +# directories that are good candidates for deletion. To do this, you need to +# determine the total size of each directory. The total size of a directory is +# the sum of the sizes of the files it contains, directly or indirectly. +# (Directories themselves do not count as having any intrinsic size.) + +# The total sizes of the directories above can be found as follows: + +# The total size of directory e is 584 because it contains a single file i +# of size 584 and no other directories. +# The directory a has total size 94853 because it contains files f (size +# 29116), g (size 2557), and h.lst (size 62596), plus file i indirectly (a +# contains e which contains i). +# Directory d has total size 24933642. +# As the outermost directory, / contains every file. Its total size is +# 48381165, the sum of the size of every file. + +# To begin, find all of the directories with a total size of at most 100000, +# then calculate the sum of their total sizes. In the example above, these +# directories are a and e; the sum of their total sizes is 95437 (94853 + 584). +# (As in this example, this process can count files more than once!) + +# Find all of the directories with a total size of at most 100000. What is the +# sum of the total sizes of those directories? + +with open("P7.txt") as f: + filesystem = [line for line in f.read().splitlines()] + + +tree = [] +total = 0 +for line in filesystem: + if "$ cd" in line: + if ".." in line: + dir_size = tree.pop() + tree[-1] += dir_size + if dir_size < 100_000: + total += dir_size + else: + tree.append(0) + elif line[0].isdigit(): + tree[-1] += int(line.split()[0]) + +print(total) + +# --- Part Two --- + +# Now, you're ready to choose a directory to delete. + +# The total disk space available to the filesystem is 70000000. To run the +# update, you need unused space of at least 30000000. You need to find a +# directory you can delete that will free up enough space to run the update. + +# In the example above, the total size of the outermost directory (and thus the +# total amount of used space) is 48381165; this means that the size of the +# unused space must currently be 21618835, which isn't quite the 30000000 +# required by the update. Therefore, the update still requires a directory with +# total size of at least 8381165 to be deleted before it can run. + +# To achieve this, you have the following options: + +# Delete directory e, which would increase unused space by 584. +# Delete directory a, which would increase unused space by 94853. +# Delete directory d, which would increase unused space by 24933642. +# Delete directory /, which would increase unused space by 48381165. + +# Directories e and a are both too small; deleting them would not free up +# enough space. However, directories d and / are both big enough! Between +# these, choose the smallest: d, increasing unused space by 24933642. + +# Find the smallest directory that, if deleted, would free up enough space on +# the filesystem to run the update. What is the total size of that directory? + +tree = [] +total = [] +for line in filesystem: + if "$ cd" in line: + if ".." in line: + dir_size = tree.pop() + tree[-1] += dir_size + total.append(dir_size) + else: + tree.append(0) + elif line[0].isdigit(): + tree[-1] += int(line.split()[0]) + +while tree: + total.append(tree.pop()) + + if tree: + tree[-1] += total[-1] + +total.sort() + +used_space = 70_000_000 - total[-1] +for size_dir in total: + if used_space + size_dir >= 30_000_000: + print(size_dir) + break diff --git a/src/Year_2022/Day08.py b/src/Year_2022/Day08.py new file mode 100644 index 0000000..e0aa3c7 --- /dev/null +++ b/src/Year_2022/Day08.py @@ -0,0 +1,175 @@ +# --- Day 8: Treetop Tree House --- + +# The expedition comes across a peculiar patch of tall trees all planted +# carefully in a grid. The Elves explain that a previous expedition planted +# these trees as a reforestation effort. Now, they're curious if this would be +# a good location for a tree house. + +# First, determine whether there is enough tree cover here to keep a tree house +# hidden. To do this, you need to count the number of trees that are visible +# from outside the grid when looking directly along a row or column. + +# The Elves have already launched a quadcopter to generate a map with the +# height of each tree (your puzzle input). For example: + +# 30373 +# 25512 +# 65332 +# 33549 +# 35390 + +# Each tree is represented as a single digit whose value is its height, where 0 +# is the shortest and 9 is the tallest. + +# A tree is visible if all of the other trees between it and an edge of the +# grid are shorter than it. Only consider trees in the same row or column; that +# is, only look up, down, left, or right from any given tree. + +# All of the trees around the edge of the grid are visible - since they are +# already on the edge, there are no trees to block the view. In this example, +# that only leaves the interior nine trees to consider: + +# The top-left 5 is visible from the left and top. (It isn't visible from +# the right or bottom since other trees of height 5 are in the way.) +# The top-middle 5 is visible from the top and right. +# The top-right 1 is not visible from any direction; for it to be visible, +# there would need to only be trees of height 0 between it and an edge. +# The left-middle 5 is visible, but only from the right. +# The center 3 is not visible from any direction; for it to be visible, +# there would need to be only trees of at most height 2 between it and an edge. +# The right-middle 3 is visible from the right. +# In the bottom row, the middle 5 is visible, but the 3 and 4 are not. + +# With 16 trees visible on the edge and another 5 visible in the interior, a +# total of 21 trees are visible in this arrangement. + +# Consider your map; how many trees are visible from outside the grid? + +import numpy as np + +with open("/home/xfeluser/AoC_2022/P8.txt") as f: + grid = [int(num) for line in f.read().strip().split() for num in line] + +grid_arr = np.array(grid).reshape(int(len(grid) ** 0.5), int(len(grid) ** 0.5)) + +perimeter = grid_arr.shape[0] * 2 + (grid_arr.shape[0] - 2) * 2 + + +def is_visible(arr, x, y): + point = arr[x, y] + top = arr[:x, y] + bottom = arr[x + 1 :, y] + left = arr[x, :y] + right = arr[x, y + 1 :] + + return np.any( + [1 for pos in [top, bottom, left, right] if np.all(point - pos > 0)] + ) + + +total = 0 +for idx, element in enumerate(np.nditer(grid_arr[1:-1, 1:-1])): + x = 1 + (idx // grid_arr[1:-1, 1:-1].shape[0]) + y = 1 + (idx % grid_arr[1:-1, 1:-1].shape[0]) + if is_visible(grid_arr, x, y): + total += 1 + +print(perimeter + total) + + +# --- Part Two --- + +# Content with the amount of tree cover available, the Elves just need to know +# the best spot to build their tree house: they would like to be able to see a +# lot of trees. + +# To measure the viewing distance from a given tree, look up, down, left, and +# right from that tree; stop if you reach an edge or at the first tree that is +# the same height or taller than the tree under consideration. (If a tree is +# right on the edge, at least one of its viewing distances will be zero.) + +# The Elves don't care about distant trees taller than those found by the rules +# above; the proposed tree house has large eaves to keep it dry, so they +# wouldn't be able to see higher than the tree house anyway. + +# In the example above, consider the middle 5 in the second row: + +# 30373 +# 25512 +# 65332 +# 33549 +# 35390 + +# Looking up, its view is not blocked; it can see 1 tree (of height 3). +# Looking left, its view is blocked immediately; it can see only 1 tree +# (of height 5, right next to it). +# Looking right, its view is not blocked; it can see 2 trees. +# Looking down, its view is blocked eventually; it can see 2 trees (one of +# height 3, then the tree of height 5 that blocks its view). + +# A tree's scenic score is found by multiplying together its viewing distance +# in each of the four directions. For this tree, this is 4 (found by +# multiplying 1 * 1 * 2 * 2). + +# However, you can do even better: consider the tree of height 5 in the middle +# of the fourth row: + +# 30373 +# 25512 +# 65332 +# 33549 +# 35390 + +# Looking up, its view is blocked at 2 trees (by another tree with a height +# of 5). +# Looking left, its view is not blocked; it can see 2 trees. +# Looking down, its view is also not blocked; it can see 1 tree. +# Looking right, its view is blocked at 2 trees (by a massive tree of +# height 9). + +# This tree's scenic score is 8 (2 * 2 * 1 * 2); this is the ideal spot for the +# tree house. + +# Consider each tree on your map. What is the highest scenic score possible for +# any tree? + +from math import prod + + +def visibility(arr, x, y): + point = arr[x, y] + top = arr[:x, y] + bottom = arr[x + 1 :, y] + left = arr[x, :y] + right = arr[x, y + 1 :] + + return prod( + ( + length_path(point, direction) + for direction in [top[::-1], bottom, left[::-1], right] + ) + ) + + +def length_path(p, direction): + path_length = 0 + for pos in direction: + if p - pos >= 0: + path_length += 1 + if p - pos == 0: + break + else: + path_length += 1 + break + + return path_length + + +total = 0 +maximum_path = 0 +for idx, element in enumerate(np.nditer(grid_arr[1:-1, 1:-1])): + x = 1 + (idx // grid_arr[1:-1, 1:-1].shape[0]) + y = 1 + (idx % grid_arr[1:-1, 1:-1].shape[0]) + maximum_path = max(visibility(grid_arr, x, y), maximum_path) + +print(maximum_path) diff --git a/src/Year_2022/Day09.py b/src/Year_2022/Day09.py new file mode 100644 index 0000000..1521c56 --- /dev/null +++ b/src/Year_2022/Day09.py @@ -0,0 +1,770 @@ +# --- Day 9: Rope Bridge --- + +# This rope bridge creaks as you walk along it. You aren't sure how old it is, +# or whether it can even support your weight. + +# It seems to support the Elves just fine, though. The bridge spans a gorge +# which was carved out by the massive river far below you. + +# You step carefully; as you do, the ropes stretch and twist. You decide to +# distract yourself by modeling rope physics; maybe you can even figure out +# where not to step. + +# Consider a rope with a knot at each end; these knots mark the head and the +# tail of the rope. If the head moves far enough away from the tail, the tail +# is pulled toward the head. + +# Due to nebulous reasoning involving Planck lengths, you should be able to +# model the positions of the knots on a two-dimensional grid. Then, by +# following a hypothetical series of motions (your puzzle input) for the head, +# you can determine how the tail will move. + +# Due to the aforementioned Planck lengths, the rope must be quite short; in +# fact, the head (H) and tail (T) must always be touching (diagonally adjacent +# and even overlapping both count as touching): + +# .... +# .TH. +# .... + +# .... +# .H.. +# ..T. +# .... + +# ... +# .H. (H covers T) +# ... + +# If the head is ever two steps directly up, down, left, or right from the +# tail, the tail must also move one step in that direction so it remains close +# enough: + +# ..... ..... ..... +# .TH.. -> .T.H. -> ..TH. +# ..... ..... ..... + +# ... ... ... +# .T. .T. ... +# .H. -> ... -> .T. +# ... .H. .H. +# ... ... ... + +# Otherwise, if the head and tail aren't touching and aren't in the same row or +# column, the tail always moves one step diagonally to keep up: + +# ..... ..... ..... +# ..... ..H.. ..H.. +# ..H.. -> ..... -> ..T.. +# .T... .T... ..... +# ..... ..... ..... + +# ..... ..... ..... +# ..... ..... ..... +# ..H.. -> ...H. -> ..TH. +# .T... .T... ..... +# ..... ..... ..... + +# You just need to work out where the tail goes as the head follows a series of +# motions. Assume the head and the tail both start at the same position, +# overlapping. + +# For example: + +# R 4 +# U 4 +# L 3 +# D 1 +# R 4 +# D 1 +# L 5 +# R 2 + +# This series of motions moves the head right four steps, then up four steps, +# then left three steps, then down one step, and so on. After each step, you'll +# need to update the position of the tail if the step means the head is no +# longer adjacent to the tail. Visually, these motions occur as follows (s +# marks the starting position as a reference point): + +# == Initial State == + +# ...... +# ...... +# ...... +# ...... +# H..... (H covers T, s) + +# == R 4 == + +# ...... +# ...... +# ...... +# ...... +# TH.... (T covers s) + +# ...... +# ...... +# ...... +# ...... +# sTH... + +# ...... +# ...... +# ...... +# ...... +# s.TH.. + +# ...... +# ...... +# ...... +# ...... +# s..TH. + +# == U 4 == + +# ...... +# ...... +# ...... +# ....H. +# s..T.. + +# ...... +# ...... +# ....H. +# ....T. +# s..... + +# ...... +# ....H. +# ....T. +# ...... +# s..... + +# ....H. +# ....T. +# ...... +# ...... +# s..... + +# == L 3 == + +# ...H.. +# ....T. +# ...... +# ...... +# s..... + +# ..HT.. +# ...... +# ...... +# ...... +# s..... + +# .HT... +# ...... +# ...... +# ...... +# s..... + +# == D 1 == + +# ..T... +# .H.... +# ...... +# ...... +# s..... + +# == R 4 == + +# ..T... +# ..H... +# ...... +# ...... +# s..... + +# ..T... +# ...H.. +# ...... +# ...... +# s..... + +# ...... +# ...TH. +# ...... +# ...... +# s..... + +# ...... +# ....TH +# ...... +# ...... +# s..... + +# == D 1 == + +# ...... +# ....T. +# .....H +# ...... +# s..... + +# == L 5 == + +# ...... +# ....T. +# ....H. +# ...... +# s..... + +# ...... +# ....T. +# ...H.. +# ...... +# s..... + +# ...... +# ...... +# ..HT.. +# ...... +# s..... + +# ...... +# ...... +# .HT... +# ...... +# s..... + +# ...... +# ...... +# HT.... +# ...... +# s..... + +# == R 2 == + +# ...... +# ...... +# .H.... (H covers T) +# ...... +# s..... + +# ...... +# ...... +# .TH... +# ...... +# s..... + +# After simulating the rope, you can count up all of the positions the tail +# visited at least once. In this diagram, s again marks the starting position +# (which the tail also visited) and # marks other positions the tail visited: + +# ..##.. +# ...##. +# .####. +# ....#. +# s###.. + +# So, there are 13 positions the tail visited at least once. + +# Simulate your complete hypothetical series of motions. How many positions +# does the tail of the rope visit at least once? + +with open("/home/xfeluser/AoC_2022/P9.txt") as f: + grid_positions = [line for line in f.read().strip().split("\n")] + +head = tail = (0, 0) +visited = {(0, 0)} + +for motion in grid_positions: + direction, steps = motion.split() + for _ in range(int(steps)): + head = ( + head[0] + (direction == "R") - (direction == "L"), + head[1] + (direction == "D") - (direction == "U"), + ) + + if max(abs(tail[0] - head[0]), abs(tail[1] - head[1])) == 2: + tail = ( + tail[0] + (tail[0] < head[0]) - (tail[0] > head[0]), + tail[1] + (tail[1] < head[1]) - (tail[1] > head[1]), + ) + + visited.add(tail) + +print(len(visited)) + + +# --- Part Two --- + +# A rope snaps! Suddenly, the river is getting a lot closer than you remember. +# The bridge is still there, but some of the ropes that broke are now whipping +# toward you as you fall through the air! + +# The ropes are moving too quickly to grab; you only have a few seconds to +# choose how to arch your body to avoid being hit. Fortunately, your simulation +# can be extended to support longer ropes. + +# Rather than two knots, you now must simulate a rope consisting of ten knots. +# One knot is still the head of the rope and moves according to the series of +# motions. Each knot further down the rope follows the knot in front of it +# using the same rules as before. + +# Using the same series of motions as the above example, but with the knots +# marked H, 1, 2, ..., 9, the motions now occur as follows: + +# == Initial State == + +# ...... +# ...... +# ...... +# ...... +# H..... (H covers 1, 2, 3, 4, 5, 6, 7, 8, 9, s) + +# == R 4 == + +# ...... +# ...... +# ...... +# ...... +# 1H.... (1 covers 2, 3, 4, 5, 6, 7, 8, 9, s) + +# ...... +# ...... +# ...... +# ...... +# 21H... (2 covers 3, 4, 5, 6, 7, 8, 9, s) + +# ...... +# ...... +# ...... +# ...... +# 321H.. (3 covers 4, 5, 6, 7, 8, 9, s) + +# ...... +# ...... +# ...... +# ...... +# 4321H. (4 covers 5, 6, 7, 8, 9, s) + +# == U 4 == + +# ...... +# ...... +# ...... +# ....H. +# 4321.. (4 covers 5, 6, 7, 8, 9, s) + +# ...... +# ...... +# ....H. +# .4321. +# 5..... (5 covers 6, 7, 8, 9, s) + +# ...... +# ....H. +# ....1. +# .432.. +# 5..... (5 covers 6, 7, 8, 9, s) + +# ....H. +# ....1. +# ..432. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# == L 3 == + +# ...H.. +# ....1. +# ..432. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ..H1.. +# ...2.. +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# .H1... +# ...2.. +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# == D 1 == + +# ..1... +# .H.2.. +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# == R 4 == + +# ..1... +# ..H2.. +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ..1... +# ...H.. (H covers 2) +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...1H. (1 covers 2) +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...21H +# ..43.. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# == D 1 == + +# ...... +# ...21. +# ..43.H +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# == L 5 == + +# ...... +# ...21. +# ..43H. +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...21. +# ..4H.. (H covers 3) +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...2.. +# ..H1.. (H covers 4; 1 covers 3) +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...2.. +# .H13.. (1 covers 4) +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...... +# H123.. (2 covers 4) +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# == R 2 == + +# ...... +# ...... +# .H23.. (H covers 1; 2 covers 4) +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# ...... +# ...... +# .1H3.. (H covers 2, 4) +# .5.... +# 6..... (6 covers 7, 8, 9, s) + +# Now, you need to keep track of the positions the new tail, 9, visits. In this +# example, the tail never moves, and so it only visits 1 position. However, be +# careful: more types of motion are possible than before, so you might want to +# visually compare your simulated rope to the one above. + +# Here's a larger example: + +# R 5 +# U 8 +# L 8 +# D 3 +# R 17 +# D 10 +# L 25 +# U 20 + +# These motions occur as follows (individual steps are not shown): + +# == Initial State == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ...........H.............. (H covers 1, 2, 3, 4, 5, 6, 7, 8, 9, s) +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# == R 5 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ...........54321H......... (5 covers 6, 7, 8, 9, s) +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# == U 8 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ................H......... +# ................1......... +# ................2......... +# ................3......... +# ...............54......... +# ..............6........... +# .............7............ +# ............8............. +# ...........9.............. (9 covers s) +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# == L 8 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ........H1234............. +# ............5............. +# ............6............. +# ............7............. +# ............8............. +# ............9............. +# .......................... +# .......................... +# ...........s.............. +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# == D 3 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .........2345............. +# ........1...6............. +# ........H...7............. +# ............8............. +# ............9............. +# .......................... +# .......................... +# ...........s.............. +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# == R 17 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ................987654321H +# .......................... +# .......................... +# .......................... +# .......................... +# ...........s.............. +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# == D 10 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ...........s.........98765 +# .........................4 +# .........................3 +# .........................2 +# .........................1 +# .........................H + +# == L 25 == + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ...........s.............. +# .......................... +# .......................... +# .......................... +# .......................... +# H123456789................ + +# == U 20 == + +# H......................... +# 1......................... +# 2......................... +# 3......................... +# 4......................... +# 5......................... +# 6......................... +# 7......................... +# 8......................... +# 9......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# ...........s.............. +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... + +# Now, the tail (9) visits 36 positions (including s) at least once: + +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# .......................... +# #......................... +# #.............###......... +# #............#...#........ +# .#..........#.....#....... +# ..#..........#.....#...... +# ...#........#.......#..... +# ....#......s.........#.... +# .....#..............#..... +# ......#............#...... +# .......#..........#....... +# ........#........#........ +# .........########......... + +# Simulate your complete series of motions on a larger rope with ten knots. +# How many positions does the tail of the rope visit at least once? + +snake = [(0, 0)] * 10 +visited = {(0, 0)} + +for motion in grid_positions: + direction, steps = motion.split() + for _ in range(int(steps)): + snake[0] = ( + snake[0][0] + (direction == "R") - (direction == "L"), + snake[0][1] + (direction == "D") - (direction == "U"), + ) + + for idx in range(1, 10): + head = snake[idx - 1] + tail = snake[idx] + + if max(abs(tail[0] - head[0]), abs(tail[1] - head[1])) == 2: + tail = ( + tail[0] + (tail[0] < head[0]) - (tail[0] > head[0]), + tail[1] + (tail[1] < head[1]) - (tail[1] > head[1]), + ) + + snake[idx - 1] = head + snake[idx] = tail + + visited.add(snake[-1]) + +print(len(visited)) diff --git a/src/Year_2022/Day10.py b/src/Year_2022/Day10.py new file mode 100644 index 0000000..4e1fd15 --- /dev/null +++ b/src/Year_2022/Day10.py @@ -0,0 +1,397 @@ +# --- Day 10: Cathode-Ray Tube --- + +# You avoid the ropes, plunge into the river, and swim to shore. + +# The Elves yell something about meeting back up with them upriver, but the +# river is too loud to tell exactly what they're saying. They finish crossing +# the bridge and disappear from view. + +# Situations like this must be why the Elves prioritized getting the +# communication system on your handheld device working. You pull it out of your +# pack, but the amount of water slowly draining from a big crack in its screen +# tells you it probably won't be of much immediate use. + +# Unless, that is, you can design a replacement for the device's video system! +# It seems to be some kind of cathode-ray tube screen and simple CPU that are +# both driven by a precise clock circuit. The clock circuit ticks at a constant +# rate; each tick is called a cycle. + +# Start by figuring out the signal being sent by the CPU. The CPU has a single +# register, X, which starts with the value 1. It supports only two +# instructions: + +# addx V takes two cycles to complete. After two cycles, the X register is +# increased by the value V. (V can be negative.) +# noop takes one cycle to complete. It has no other effect. + +# The CPU uses these instructions in a program (your puzzle input) to, somehow, +# tell the screen what to draw. + +# Consider the following small program: + +# noop +# addx 3 +# addx -5 + +# Execution of this program proceeds as follows: + +# At the start of the first cycle, the noop instruction begins execution. +# During the first cycle, X is 1. After the first cycle, the noop instruction +# finishes execution, doing nothing. +# At the start of the second cycle, the addx 3 instruction begins +# execution. During the second cycle, X is still 1. +# During the third cycle, X is still 1. After the third cycle, the addx 3 +# instruction finishes execution, setting X to 4. +# At the start of the fourth cycle, the addx -5 instruction begins +# execution. During the fourth cycle, X is still 4. +# During the fifth cycle, X is still 4. After the fifth cycle, the addx -5 +# instruction finishes execution, setting X to -1. + +# Maybe you can learn something by looking at the value of the X register +# throughout execution. For now, consider the signal strength (the cycle number +# multiplied by the value of the X register) during the 20th cycle and every 40 +# cycles after that (that is, during the 20th, 60th, 100th, 140th, 180th, and +# 220th cycles). + +# For example, consider this larger program: + +# 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 + +# The interesting signal strengths can be determined as follows: + +# During the 20th cycle, register X has the value 21, so the signal +# strength is 20 * 21 = 420. (The 20th cycle occurs in the middle of the second +# addx -1, so the value of register X is the starting value, 1, plus all of the +# other addx values up to that point: +# 1 + 15 - 11 + 6 - 3 + 5 - 1 - 8 + 13 + 4 = 21.) +# During the 60th cycle, register X has the value 19, so the signal +# strength is 60 * 19 = 1140. +# During the 100th cycle, register X has the value 18, so the signal +# strength is 100 * 18 = 1800. +# During the 140th cycle, register X has the value 21, so the signal +# strength is 140 * 21 = 2940. +# During the 180th cycle, register X has the value 16, so the signal +# strength is 180 * 16 = 2880. +# During the 220th cycle, register X has the value 18, so the signal +# strength is 220 * 18 = 3960. + +# The sum of these signal strengths is 13140. + +# Find the signal strength during the 20th, 60th, 100th, 140th, 180th, and +# 220th cycles. What is the sum of these six signal strengths? + +with open("/home/xfeluser/AoC_2022/P10.txt") as f: + program = [line for line in f.read().strip().split("\n")] + + +X = 1 +execution = [1, 1] + +for instruction in program: + if "noop" in instruction: + execution.append(X) + else: + execution.append(X) + X += int(instruction.split()[1]) + execution.append(X) + +cycles = [20, 60, 100, 140, 180, 220] +print(sum(cycle * execution[cycle] for cycle in cycles)) + + +# --- Part Two --- + +# It seems like the X register controls the horizontal position of a sprite. +# Specifically, the sprite is 3 pixels wide, and the X register sets the +# horizontal position of the middle of that sprite. (In this system, there is +# no such thing as "vertical position": if the sprite's horizontal position +# puts its pixels where the CRT is currently drawing, then those pixels will be +# drawn.) + +# You count the pixels on the CRT: 40 wide and 6 high. This CRT screen draws +# the top row of pixels left-to-right, then the row below that, and so on. The +# left-most pixel in each row is in position 0, and the right-most pixel in +# each row is in position 39. + +# Like the CPU, the CRT is tied closely to the clock circuit: the CRT draws a +# single pixel during each cycle. Representing each pixel of the screen as a #, +# here are the cycles during which the first and last pixel in each row are +# drawn: + +# Cycle 1 -> ######################################## <- Cycle 40 +# Cycle 41 -> ######################################## <- Cycle 80 +# Cycle 81 -> ######################################## <- Cycle 120 +# Cycle 121 -> ######################################## <- Cycle 160 +# Cycle 161 -> ######################################## <- Cycle 200 +# Cycle 201 -> ######################################## <- Cycle 240 + +# So, by carefully timing the CPU instructions and the CRT drawing operations, +# you should be able to determine whether the sprite is visible the instant +# each pixel is drawn. If the sprite is positioned such that one of its three +# pixels is the pixel currently being drawn, the screen produces a lit pixel +# (#); otherwise, the screen leaves the pixel dark (.). + +# The first few pixels from the larger example above are drawn as follows: + +# Sprite position: ###..................................... + +# Start cycle 1: begin executing addx 15 +# During cycle 1: CRT draws pixel in position 0 +# Current CRT row: # + +# During cycle 2: CRT draws pixel in position 1 +# Current CRT row: ## +# End of cycle 2: finish executing addx 15 (Register X is now 16) +# Sprite position: ...............###...................... + +# Start cycle 3: begin executing addx -11 +# During cycle 3: CRT draws pixel in position 2 +# Current CRT row: ##. + +# During cycle 4: CRT draws pixel in position 3 +# Current CRT row: ##.. +# End of cycle 4: finish executing addx -11 (Register X is now 5) +# Sprite position: ....###................................. + +# Start cycle 5: begin executing addx 6 +# During cycle 5: CRT draws pixel in position 4 +# Current CRT row: ##..# + +# During cycle 6: CRT draws pixel in position 5 +# Current CRT row: ##..## +# End of cycle 6: finish executing addx 6 (Register X is now 11) +# Sprite position: ..........###........................... + +# Start cycle 7: begin executing addx -3 +# During cycle 7: CRT draws pixel in position 6 +# Current CRT row: ##..##. + +# During cycle 8: CRT draws pixel in position 7 +# Current CRT row: ##..##.. +# End of cycle 8: finish executing addx -3 (Register X is now 8) +# Sprite position: .......###.............................. + +# Start cycle 9: begin executing addx 5 +# During cycle 9: CRT draws pixel in position 8 +# Current CRT row: ##..##..# + +# During cycle 10: CRT draws pixel in position 9 +# Current CRT row: ##..##..## +# End of cycle 10: finish executing addx 5 (Register X is now 13) +# Sprite position: ............###......................... + +# Start cycle 11: begin executing addx -1 +# During cycle 11: CRT draws pixel in position 10 +# Current CRT row: ##..##..##. + +# During cycle 12: CRT draws pixel in position 11 +# Current CRT row: ##..##..##.. +# End of cycle 12: finish executing addx -1 (Register X is now 12) +# Sprite position: ...........###.......................... + +# Start cycle 13: begin executing addx -8 +# During cycle 13: CRT draws pixel in position 12 +# Current CRT row: ##..##..##..# + +# During cycle 14: CRT draws pixel in position 13 +# Current CRT row: ##..##..##..## +# End of cycle 14: finish executing addx -8 (Register X is now 4) +# Sprite position: ...###.................................. + +# Start cycle 15: begin executing addx 13 +# During cycle 15: CRT draws pixel in position 14 +# Current CRT row: ##..##..##..##. + +# During cycle 16: CRT draws pixel in position 15 +# Current CRT row: ##..##..##..##.. +# End of cycle 16: finish executing addx 13 (Register X is now 17) +# Sprite position: ................###..................... + +# Start cycle 17: begin executing addx 4 +# During cycle 17: CRT draws pixel in position 16 +# Current CRT row: ##..##..##..##..# + +# During cycle 18: CRT draws pixel in position 17 +# Current CRT row: ##..##..##..##..## +# End of cycle 18: finish executing addx 4 (Register X is now 21) +# Sprite position: ....................###................. + +# Start cycle 19: begin executing noop +# During cycle 19: CRT draws pixel in position 18 +# Current CRT row: ##..##..##..##..##. +# End of cycle 19: finish executing noop + +# Start cycle 20: begin executing addx -1 +# During cycle 20: CRT draws pixel in position 19 +# Current CRT row: ##..##..##..##..##.. + +# During cycle 21: CRT draws pixel in position 20 +# Current CRT row: ##..##..##..##..##..# +# End of cycle 21: finish executing addx -1 (Register X is now 20) +# Sprite position: ...................###.................. + +# Allowing the program to run to completion causes the CRT to produce the +# following image: + +# ##..##..##..##..##..##..##..##..##..##.. +# ###...###...###...###...###...###...###. +# ####....####....####....####....####.... +# #####.....#####.....#####.....#####..... +# ######......######......######......#### +# #######.......#######.......#######..... + +# Render the image given by your program. What eight capital letters appear on +# your CRT? + +crt = [] +for cycle in range(241): + if not cycle % 40: + crt.append("\n") + crt.append("â–ˆ" if cycle % 40 - execution[cycle + 1] in {-1, 0, 1} else " ") + +print("".join(crt)) diff --git a/src/Year_2022/Day11.py b/src/Year_2022/Day11.py new file mode 100644 index 0000000..f1087ac --- /dev/null +++ b/src/Year_2022/Day11.py @@ -0,0 +1,439 @@ +# --- Day 11: Monkey in the Middle --- + +# As you finally start making your way upriver, you realize your pack is much +# lighter than you remember. Just then, one of the items from your pack goes +# flying overhead. Monkeys are playing Keep Away with your missing things! + +# To get your stuff back, you need to be able to predict where the monkeys will +# throw your items. After some careful observation, you realize the monkeys +# operate based on how worried you are about each item. + +# You take some notes (your puzzle input) on the items each monkey currently +# has, how worried you are about those items, and how the monkey makes +# decisions based on your worry level. For example: + +# Monkey 0: +# Starting items: 79, 98 +# Operation: new = old * 19 +# Test: divisible by 23 +# If true: throw to monkey 2 +# If false: throw to monkey 3 + +# Monkey 1: +# Starting items: 54, 65, 75, 74 +# Operation: new = old + 6 +# Test: divisible by 19 +# If true: throw to monkey 2 +# If false: throw to monkey 0 + +# Monkey 2: +# Starting items: 79, 60, 97 +# Operation: new = old * old +# Test: divisible by 13 +# If true: throw to monkey 1 +# If false: throw to monkey 3 + +# Monkey 3: +# Starting items: 74 +# Operation: new = old + 3 +# Test: divisible by 17 +# If true: throw to monkey 0 +# If false: throw to monkey 1 + +# Each monkey has several attributes: + +# Starting items lists your worry level for each item the monkey is +# currently holding in the order they will be inspected. +# Operation shows how your worry level changes as that monkey inspects an +# item. (An operation like new = old * 5 means that your worry level after the +# monkey inspected the item is five times whatever your worry level was before +# inspection.) +# Test shows how the monkey uses your worry level to decide where to throw +# an item next. +# If true shows what happens with an item if the Test was true. +# If false shows what happens with an item if the Test was false. + +# After each monkey inspects an item but before it tests your worry level, your +# relief that the monkey's inspection didn't damage the item causes your worry +# level to be divided by three and rounded down to the nearest integer. + +# The monkeys take turns inspecting and throwing items. On a single monkey's +# turn, it inspects and throws all of the items it is holding one at a time and +# in the order listed. Monkey 0 goes first, then monkey 1, and so on until each +# monkey has had one turn. The process of each monkey taking a single turn is +# called a round. + +# When a monkey throws an item to another monkey, the item goes on the end of +# the recipient monkey's list. A monkey that starts a round with no items could +# end up inspecting and throwing many items by the time its turn comes around. +# If a monkey is holding no items at the start of its turn, its turn ends. + +# In the above example, the first round proceeds as follows: + +# Monkey 0: +# Monkey inspects an item with a worry level of 79. +# Worry level is multiplied by 19 to 1501. +# Monkey gets bored with item. Worry level is divided by 3 to 500. +# Current worry level is not divisible by 23. +# Item with worry level 500 is thrown to monkey 3. +# Monkey inspects an item with a worry level of 98. +# Worry level is multiplied by 19 to 1862. +# Monkey gets bored with item. Worry level is divided by 3 to 620. +# Current worry level is not divisible by 23. +# Item with worry level 620 is thrown to monkey 3. +# Monkey 1: +# Monkey inspects an item with a worry level of 54. +# Worry level increases by 6 to 60. +# Monkey gets bored with item. Worry level is divided by 3 to 20. +# Current worry level is not divisible by 19. +# Item with worry level 20 is thrown to monkey 0. +# Monkey inspects an item with a worry level of 65. +# Worry level increases by 6 to 71. +# Monkey gets bored with item. Worry level is divided by 3 to 23. +# Current worry level is not divisible by 19. +# Item with worry level 23 is thrown to monkey 0. +# Monkey inspects an item with a worry level of 75. +# Worry level increases by 6 to 81. +# Monkey gets bored with item. Worry level is divided by 3 to 27. +# Current worry level is not divisible by 19. +# Item with worry level 27 is thrown to monkey 0. +# Monkey inspects an item with a worry level of 74. +# Worry level increases by 6 to 80. +# Monkey gets bored with item. Worry level is divided by 3 to 26. +# Current worry level is not divisible by 19. +# Item with worry level 26 is thrown to monkey 0. +# Monkey 2: +# Monkey inspects an item with a worry level of 79. +# Worry level is multiplied by itself to 6241. +# Monkey gets bored with item. Worry level is divided by 3 to 2080. +# Current worry level is divisible by 13. +# Item with worry level 2080 is thrown to monkey 1. +# Monkey inspects an item with a worry level of 60. +# Worry level is multiplied by itself to 3600. +# Monkey gets bored with item. Worry level is divided by 3 to 1200. +# Current worry level is not divisible by 13. +# Item with worry level 1200 is thrown to monkey 3. +# Monkey inspects an item with a worry level of 97. +# Worry level is multiplied by itself to 9409. +# Monkey gets bored with item. Worry level is divided by 3 to 3136. +# Current worry level is not divisible by 13. +# Item with worry level 3136 is thrown to monkey 3. +# Monkey 3: +# Monkey inspects an item with a worry level of 74. +# Worry level increases by 3 to 77. +# Monkey gets bored with item. Worry level is divided by 3 to 25. +# Current worry level is not divisible by 17. +# Item with worry level 25 is thrown to monkey 1. +# Monkey inspects an item with a worry level of 500. +# Worry level increases by 3 to 503. +# Monkey gets bored with item. Worry level is divided by 3 to 167. +# Current worry level is not divisible by 17. +# Item with worry level 167 is thrown to monkey 1. +# Monkey inspects an item with a worry level of 620. +# Worry level increases by 3 to 623. +# Monkey gets bored with item. Worry level is divided by 3 to 207. +# Current worry level is not divisible by 17. +# Item with worry level 207 is thrown to monkey 1. +# Monkey inspects an item with a worry level of 1200. +# Worry level increases by 3 to 1203. +# Monkey gets bored with item. Worry level is divided by 3 to 401. +# Current worry level is not divisible by 17. +# Item with worry level 401 is thrown to monkey 1. +# Monkey inspects an item with a worry level of 3136. +# Worry level increases by 3 to 3139. +# Monkey gets bored with item. Worry level is divided by 3 to 1046. +# Current worry level is not divisible by 17. +# Item with worry level 1046 is thrown to monkey 1. + +# After round 1, the monkeys are holding items with these worry levels: + +# Monkey 0: 20, 23, 27, 26 +# Monkey 1: 2080, 25, 167, 207, 401, 1046 +# Monkey 2: +# Monkey 3: + +# Monkeys 2 and 3 aren't holding any items at the end of the round; they both +# inspected items during the round and threw them all before the round ended. + +# This process continues for a few more rounds: + +# After round 2, the monkeys are holding items with these worry levels: +# Monkey 0: 695, 10, 71, 135, 350 +# Monkey 1: 43, 49, 58, 55, 362 +# Monkey 2: +# Monkey 3: + +# After round 3, the monkeys are holding items with these worry levels: +# Monkey 0: 16, 18, 21, 20, 122 +# Monkey 1: 1468, 22, 150, 286, 739 +# Monkey 2: +# Monkey 3: + +# After round 4, the monkeys are holding items with these worry levels: +# Monkey 0: 491, 9, 52, 97, 248, 34 +# Monkey 1: 39, 45, 43, 258 +# Monkey 2: +# Monkey 3: + +# After round 5, the monkeys are holding items with these worry levels: +# Monkey 0: 15, 17, 16, 88, 1037 +# Monkey 1: 20, 110, 205, 524, 72 +# Monkey 2: +# Monkey 3: + +# After round 6, the monkeys are holding items with these worry levels: +# Monkey 0: 8, 70, 176, 26, 34 +# Monkey 1: 481, 32, 36, 186, 2190 +# Monkey 2: +# Monkey 3: + +# After round 7, the monkeys are holding items with these worry levels: +# Monkey 0: 162, 12, 14, 64, 732, 17 +# Monkey 1: 148, 372, 55, 72 +# Monkey 2: +# Monkey 3: + +# After round 8, the monkeys are holding items with these worry levels: +# Monkey 0: 51, 126, 20, 26, 136 +# Monkey 1: 343, 26, 30, 1546, 36 +# Monkey 2: +# Monkey 3: + +# After round 9, the monkeys are holding items with these worry levels: +# Monkey 0: 116, 10, 12, 517, 14 +# Monkey 1: 108, 267, 43, 55, 288 +# Monkey 2: +# Monkey 3: + +# After round 10, the monkeys are holding items with these worry levels: +# Monkey 0: 91, 16, 20, 98 +# Monkey 1: 481, 245, 22, 26, 1092, 30 +# Monkey 2: +# Monkey 3: + +# ... + +# After round 15, the monkeys are holding items with these worry levels: +# Monkey 0: 83, 44, 8, 184, 9, 20, 26, 102 +# Monkey 1: 110, 36 +# Monkey 2: +# Monkey 3: + +# ... + +# After round 20, the monkeys are holding items with these worry levels: +# Monkey 0: 10, 12, 14, 26, 34 +# Monkey 1: 245, 93, 53, 199, 115 +# Monkey 2: +# Monkey 3: + +# Chasing all of the monkeys at once is impossible; you're going to have to +# focus on the two most active monkeys if you want any hope of getting your +# stuff back. Count the total number of times each monkey inspects items over +# 20 rounds: + +# Monkey 0 inspected items 101 times. +# Monkey 1 inspected items 95 times. +# Monkey 2 inspected items 7 times. +# Monkey 3 inspected items 105 times. + +# In this example, the two most active monkeys inspected items 101 and 105 +# times. The level of monkey business in this situation can be found by +# multiplying these together: 10605. + +# Figure out which monkeys to chase by counting how many items they inspect +# over 20 rounds. What is the level of monkey business after 20 rounds of +# stuff-slinging simian shenanigans? + +from dataclasses import dataclass +from math import prod + +with open("/home/xfeluser/AoC_2022/P11.txt") as f: + monkeys_list = [ + [line for line in monkey.split("\n")] + for monkey in f.read().split("\n\n") + ] + + +def parse_monkeys(lst): + monkeys = [] + + for monkey in lst: + items = [int(i) for i in monkey[1][18:].split(",")] + op = monkey[2][23:].split() + divisor = int(monkey[3][21:]) + # True is the 0th item, False is the 1st! + dest = [int(monkey[4][29]), int(monkey[5][30])] + monkeys.append(Monkey(items, op, divisor, dest)) + + return monkeys + + +@dataclass +class Monkey: + items: list[int] + op: list[str] + divisor: int + dest: list[int] + act: int = 0 + + +def inspection(monkey): + for item in monkey.items: + op, value = monkey.op + if value == "old": + value = item + else: + value = int(value) + if op == "*": + item = (item * value) // 3 + elif op == "+": + item = (item + value) // 3 + + # False if it divisible! + is_bored = bool(item % monkey.divisor) + monkey_receiving = monkey.dest[is_bored] + throw_to_monkey = monkeys[monkey_receiving] + throw_to_monkey.items.append(item) + monkey.act += 1 + + monkey.items = [] + + +monkeys = parse_monkeys(monkeys_list) +rounds = 20 +for _ in range(rounds): + for monkey in monkeys: + inspection(monkey) + +print(prod(sorted([m.act for m in monkeys])[-2:])) + + +# --- Part Two --- + +# You're worried you might not ever get your items back. So worried, in fact, +# that your relief that a monkey's inspection didn't damage an item no longer +# causes your worry level to be divided by three. + +# Unfortunately, that relief was all that was keeping your worry levels from +# reaching ridiculous levels. You'll need to find another way to keep your +# worry levels manageable. + +# At this rate, you might be putting up with these monkeys for a very long time +# - possibly 10000 rounds! + +# With these new rules, you can still figure out the monkey business after +# 10000 rounds. Using the same example above: + +# == After round 1 == +# Monkey 0 inspected items 2 times. +# Monkey 1 inspected items 4 times. +# Monkey 2 inspected items 3 times. +# Monkey 3 inspected items 6 times. + +# == After round 20 == +# Monkey 0 inspected items 99 times. +# Monkey 1 inspected items 97 times. +# Monkey 2 inspected items 8 times. +# Monkey 3 inspected items 103 times. + +# == After round 1000 == +# Monkey 0 inspected items 5204 times. +# Monkey 1 inspected items 4792 times. +# Monkey 2 inspected items 199 times. +# Monkey 3 inspected items 5192 times. + +# == After round 2000 == +# Monkey 0 inspected items 10419 times. +# Monkey 1 inspected items 9577 times. +# Monkey 2 inspected items 392 times. +# Monkey 3 inspected items 10391 times. + +# == After round 3000 == +# Monkey 0 inspected items 15638 times. +# Monkey 1 inspected items 14358 times. +# Monkey 2 inspected items 587 times. +# Monkey 3 inspected items 15593 times. + +# == After round 4000 == +# Monkey 0 inspected items 20858 times. +# Monkey 1 inspected items 19138 times. +# Monkey 2 inspected items 780 times. +# Monkey 3 inspected items 20797 times. + +# == After round 5000 == +# Monkey 0 inspected items 26075 times. +# Monkey 1 inspected items 23921 times. +# Monkey 2 inspected items 974 times. +# Monkey 3 inspected items 26000 times. + +# == After round 6000 == +# Monkey 0 inspected items 31294 times. +# Monkey 1 inspected items 28702 times. +# Monkey 2 inspected items 1165 times. +# Monkey 3 inspected items 31204 times. + +# == After round 7000 == +# Monkey 0 inspected items 36508 times. +# Monkey 1 inspected items 33488 times. +# Monkey 2 inspected items 1360 times. +# Monkey 3 inspected items 36400 times. + +# == After round 8000 == +# Monkey 0 inspected items 41728 times. +# Monkey 1 inspected items 38268 times. +# Monkey 2 inspected items 1553 times. +# Monkey 3 inspected items 41606 times. + +# == After round 9000 == +# Monkey 0 inspected items 46945 times. +# Monkey 1 inspected items 43051 times. +# Monkey 2 inspected items 1746 times. +# Monkey 3 inspected items 46807 times. + +# == After round 10000 == +# Monkey 0 inspected items 52166 times. +# Monkey 1 inspected items 47830 times. +# Monkey 2 inspected items 1938 times. +# Monkey 3 inspected items 52013 times. + +# After 10000 rounds, the two most active monkeys inspected items 52166 and +# 52013 times. Multiplying these together, the level of monkey business in this +# situation is now 2713310158. + +# Worry levels are no longer divided by three after each item is inspected; +# you'll need to find another way to keep your worry levels manageable. +# Starting again from the initial state in your puzzle input, what is the level +# of monkey business after 10000 rounds? + + +def inspection_long(monkey): + for item in monkey.items: + op, value = monkey.op + if value == "old": + value = item + else: + value = int(value) + magic_divisor = prod([m.divisor for m in monkeys]) + if op == "*": + item = (item * value) % magic_divisor + elif op == "+": + item = (item + value) % magic_divisor + + # False if it divisible! + is_bored = bool(item % monkey.divisor) + monkey_receiving = monkey.dest[is_bored] + throw_to_monkey = monkeys[monkey_receiving] + throw_to_monkey.items.append(item) + monkey.act += 1 + + monkey.items = [] + + +monkeys = parse_monkeys(monkeys_list) +rounds = 10_000 +for _ in range(rounds): + for monkey in monkeys: + inspection_long(monkey) + +print(prod(sorted([m.act for m in monkeys])[-2:])) diff --git a/src/Year_2022/Day12.py b/src/Year_2022/Day12.py new file mode 100644 index 0000000..67feca6 --- /dev/null +++ b/src/Year_2022/Day12.py @@ -0,0 +1,140 @@ +# --- Day 12: Hill Climbing Algorithm --- + +# You try contacting the Elves using your handheld device, but the river you're +# following must be too low to get a decent signal. + +# You ask the device for a heightmap of the surrounding area (your puzzle +# input). The heightmap shows the local area from above broken into a grid; +# the elevation of each square of the grid is given by a single lowercase +# letter, where a is the lowest elevation, b is the next-lowest, and so on up +# to the highest elevation, z. + +# Also included on the heightmap are marks for your current position (S) and +# the location that should get the best signal (E). Your current position (S) +# has elevation a, and the location that should get the best signal (E) has +# elevation z. + +# You'd like to reach E, but to save energy, you should do it in as few steps +# as possible. During each step, you can move exactly one square up, down, +# left, or right. To avoid needing to get out your climbing gear, the elevation +# of the destination square can be at most one higher than the elevation of +# your current square; that is, if your current elevation is m, you could step +# to elevation n, but not to elevation o. (This also means that the elevation +# of the destination square can be much lower than the elevation of your +# current square.) + +# For example: + +# Sabqponm +# abcryxxl +# accszExk +# acctuvwj +# abdefghi + +# Here, you start in the top-left corner; your goal is near the middle. You +# could start by moving down or right, but eventually you'll need to head +# toward the e at the bottom. From there, you can spiral around to the goal: + +# v..v<<<< +# >v.vv<<^ +# .>vv>E^^ +# ..v>>>^^ +# ..>>>>>^ + +# In the above diagram, the symbols indicate whether the path exits each +# square moving up (^), down (v), left (<), or right (>). The location that +# should get the best signal is still E, and . marks unvisited squares. + +# This path reaches the goal in 31 steps, the fewest possible. + +# What is the fewest steps required to move from your current position to the +# location that should get the best signal? + +with open("/home/xfeluser/AoC_2022/P12.txt") as f: + diagram = { + (x, y): ord(e) + for y, line in enumerate(f.read().strip().split("\n")) + for x, e in enumerate(line.strip()) + } + +start = [k for k in diagram if diagram[k] == ord("S")][0] +end = [k for k in diagram if diagram[k] == ord("E")][0] +# Use expected value for starting/ending point +diagram[start] = ord("a") +diagram[end] = ord("z") + +queue = [(start, 0)] +pos_to_steps = {} + +while queue: + cur, steps = queue.pop() + + if cur not in pos_to_steps or steps < pos_to_steps[cur]: + pos_to_steps[cur] = steps + + for offset in ((1, 0), (-1, 0), (0, 1), (0, -1)): + new_pos = cur[0] + offset[0], cur[1] + offset[1] + + if new_pos in diagram and diagram[new_pos] - diagram[cur] <= 1: + queue.append((new_pos, steps + 1)) + +print(pos_to_steps[end]) + + +# --- Part Two --- + +# As you walk up the hill, you suspect that the Elves will want to turn this +# into a hiking trail. The beginning isn't very scenic, though; perhaps you can +# find a better starting point. + +# To maximize exercise while hiking, the trail should start as low as possible: +# elevation a. The goal is still the square marked E. However, the trail should +# still be direct, taking the fewest steps to reach its goal. So, you'll need +# to find the shortest path from any square at elevation a to the square marked +# E. + +# Again consider the example from above: + +# Sabqponm +# abcryxxl +# accszExk +# acctuvwj +# abdefghi + +# Now, there are six choices for starting position (five marked a, plus the +# square marked S that counts as being at elevation a). If you start at the +# bottom-left square, you can reach the goal most quickly: + +# ...v<<<< +# ...vv<<^ +# ...v>E^^ +# .>v>>>^^ +# >^>>>>>^ + +# This path reaches the goal in only 29 steps, the fewest possible. + +# What is the fewest steps required to move starting from any square with +# elevation a to the location that should get the best signal? + +starts = [] +pos_to_steps = {} + +for start in [k for k in diagram if diagram[k] == ord("a")]: + queue = [(start, 0)] + + while queue: + cur, steps = queue.pop() + + if cur not in pos_to_steps or steps < pos_to_steps[cur]: + pos_to_steps[cur] = steps + + for offset in ((1, 0), (-1, 0), (0, 1), (0, -1)): + new_pos = cur[0] + offset[0], cur[1] + offset[1] + + if new_pos in diagram and diagram[new_pos] - diagram[cur] <= 1: + queue.append((new_pos, steps + 1)) + + if end in pos_to_steps: + starts.append(pos_to_steps[end]) + +print(min(starts)) diff --git a/src/Year_2022/Day13.py b/src/Year_2022/Day13.py new file mode 100644 index 0000000..f651adb --- /dev/null +++ b/src/Year_2022/Day13.py @@ -0,0 +1,218 @@ +# --- Day 13: Distress Signal --- + +# You climb the hill and again try contacting the Elves. However, you instead +# receive a signal you weren't expecting: a distress signal. + +# Your handheld device must still not be working properly; the packets from the +# distress signal got decoded out of order. You'll need to re-order the list of +# received packets (your puzzle input) to decode the message. + +# Your list consists of pairs of packets; pairs are separated by a blank line. +# You need to identify how many pairs of packets are in the right order. + +# For example: + +# [1,1,3,1,1] +# [1,1,5,1,1] + +# [[1],[2,3,4]] +# [[1],4] + +# [9] +# [[8,7,6]] + +# [[4,4],4,4] +# [[4,4],4,4,4] + +# [7,7,7,7] +# [7,7,7] + +# [] +# [3] + +# [[[]]] +# [[]] + +# [1,[2,[3,[4,[5,6,7]]]],8,9] +# [1,[2,[3,[4,[5,6,0]]]],8,9] + +# Packet data consists of lists and integers. Each list starts with [, ends +# with ], and contains zero or more comma-separated values (either integers or +# other lists). Each packet is always a list and appears on its own line. + +# When comparing two values, the first value is called left and the second +# value is called right. Then: + +# If both values are integers, the lower integer should come first. If the +# left integer is lower than the right integer, the inputs are in the right +# order. If the left integer is higher than the right integer, the inputs are +# not in the right order. Otherwise, the inputs are the same integer; continue +# checking the next part of the input. +# If both values are lists, compare the first value of each list, then the +# second value, and so on. If the left list runs out of items first, the inputs +# are in the right order. If the right list runs out of items first, the inputs +# are not in the right order. If the lists are the same length and no +# comparison makes a decision about the order, continue checking the next part +# of the input. +# If exactly one value is an integer, convert the integer to a list which +# contains that integer as its only value, then retry the comparison. For +# example, if comparing [0,0,0] and 2, convert the right value to [2] (a list +# containing 2); the result is then found by instead comparing [0,0,0] and [2]. + +# Using these rules, you can determine which of the pairs in the example are in +# the right order: + +# == Pair 1 == +# - Compare [1,1,3,1,1] vs [1,1,5,1,1] +# - Compare 1 vs 1 +# - Compare 1 vs 1 +# - Compare 3 vs 5 +# - Left side is smaller, so inputs are in the right order + +# == Pair 2 == +# - Compare [[1],[2,3,4]] vs [[1],4] +# - Compare [1] vs [1] +# - Compare 1 vs 1 +# - Compare [2,3,4] vs 4 +# - Mixed types; convert right to [4] and retry comparison +# - Compare [2,3,4] vs [4] +# - Compare 2 vs 4 +# - Left side is smaller, so inputs are in the right order + +# == Pair 3 == +# - Compare [9] vs [[8,7,6]] +# - Compare 9 vs [8,7,6] +# - Mixed types; convert left to [9] and retry comparison +# - Compare [9] vs [8,7,6] +# - Compare 9 vs 8 +# - Right side is smaller, so inputs are not in the right order + +# == Pair 4 == +# - Compare [[4,4],4,4] vs [[4,4],4,4,4] +# - Compare [4,4] vs [4,4] +# - Compare 4 vs 4 +# - Compare 4 vs 4 +# - Compare 4 vs 4 +# - Compare 4 vs 4 +# - Left side ran out of items, so inputs are in the right order + +# == Pair 5 == +# - Compare [7,7,7,7] vs [7,7,7] +# - Compare 7 vs 7 +# - Compare 7 vs 7 +# - Compare 7 vs 7 +# - Right side ran out of items, so inputs are not in the right order + +# == Pair 6 == +# - Compare [] vs [3] +# - Left side ran out of items, so inputs are in the right order + +# == Pair 7 == +# - Compare [[[]]] vs [[]] +# - Compare [[]] vs [] +# - Right side ran out of items, so inputs are not in the right order + +# == Pair 8 == +# - Compare [1,[2,[3,[4,[5,6,7]]]],8,9] vs [1,[2,[3,[4,[5,6,0]]]],8,9] +# - Compare 1 vs 1 +# - Compare [2,[3,[4,[5,6,7]]]] vs [2,[3,[4,[5,6,0]]]] +# - Compare 2 vs 2 +# - Compare [3,[4,[5,6,7]]] vs [3,[4,[5,6,0]]] +# - Compare 3 vs 3 +# - Compare [4,[5,6,7]] vs [4,[5,6,0]] +# - Compare 4 vs 4 +# - Compare [5,6,7] vs [5,6,0] +# - Compare 5 vs 5 +# - Compare 6 vs 6 +# - Compare 7 vs 0 +# - Right side is smaller, so inputs are not in the right order + +# What are the indices of the pairs that are already in the right order? (The +# first pair has index 1, the second pair has index 2, and so on.) In the above +# example, the pairs in the right order are 1, 2, 4, and 6; the sum of these +# indices is 13. + +# Determine which pairs of packets are already in the right order. What is the +# sum of the indices of those pairs? + +from ast import literal_eval + +with open("/home/xfeluser/AoC_2022/P13.txt") as f: + packets = [literal_eval(line) for line in f.read().strip().split()] + + +def is_ordered(left, right): + if type(left) is list or type(right) is list: + if type(left) is not list: + left = [left] + if type(right) is not list: + right = [right] + for rec_left, rec_right in zip(left, right): + rec = is_ordered(rec_left, rec_right) + if rec != 0: + return rec + return len(left) - len(right) + else: + return left - right + + +count = 0 +for idx, (left, right) in enumerate(zip(packets[::2], packets[1::2]), start=1): + if is_ordered(left, right) >= 0: + continue + count += idx + +print(count) + + +# --- Part Two --- + +# Now, you just need to put all of the packets in the right order. Disregard +# the blank lines in your list of received packets. + +# The distress signal protocol also requires that you include two additional +# divider packets: + +# [[2]] +# [[6]] + +# Using the same rules as before, organize all packets - the ones in your list +# of received packets as well as the two divider packets - into the correct +# order. + +# For the example above, the result of putting the packets in the correct order +# is: + +# [] +# [[]] +# [[[]]] +# [1,1,3,1,1] +# [1,1,5,1,1] +# [[1],[2,3,4]] +# [1,[2,[3,[4,[5,6,0]]]],8,9] +# [1,[2,[3,[4,[5,6,7]]]],8,9] +# [[1],4] +# [[2]] +# [3] +# [[4,4],4,4] +# [[4,4],4,4,4] +# [[6]] +# [7,7,7] +# [7,7,7,7] +# [[8,7,6]] +# [9] + +# Afterward, locate the divider packets. To find the decoder key for this +# distress signal, you need to determine the indices of the two divider packets +# and multiply them together. (The first packet is at index 1, the second +# packet is at index 2, and so on.) In this example, the divider packets are +# 10th and 14th, and so the decoder key is 140. + +# Organize all of the packets into the correct order. What is the decoder key +# for the distress signal? + +from functools import cmp_to_key + +packets += [[[2]], [[6]]] +packets_sorted = sorted(packets, key=cmp_to_key(is_ordered)) +print((packets_sorted.index([[2]]) + 1) * (packets_sorted.index([[6]]) + 1)) diff --git a/src/Year_2022/Day14.py b/src/Year_2022/Day14.py new file mode 100644 index 0000000..d15ecb9 --- /dev/null +++ b/src/Year_2022/Day14.py @@ -0,0 +1,254 @@ +# --- Day 14: Regolith Reservoir --- + +# The distress signal leads you to a giant waterfall! Actually, hang on - the +# signal seems like it's coming from the waterfall itself, and that doesn't +# make any sense. However, you do notice a little path that leads behind the +# waterfall. + +# Correction: the distress signal leads you behind a giant waterfall! There +# seems to be a large cave system here, and the signal definitely leads further +# inside. + +# As you begin to make your way deeper underground, you feel the ground rumble +# for a moment. Sand begins pouring into the cave! If you don't quickly figure +# out where the sand is going, you could quickly become trapped! + +# Fortunately, your familiarity with analyzing the path of falling material +# will come in handy here. You scan a two-dimensional vertical slice of the +# cave above you (your puzzle input) and discover that it is mostly air with +# structures made of rock. + +# Your scan traces the path of each solid rock structure and reports the x,y +# coordinates that form the shape of the path, where x represents distance to +# the right and y represents distance down. Each path appears as a single line +# of text in your scan. After the first point of each path, each point +# indicates the end of a straight horizontal or vertical line to be drawn from +# the previous point. For example: + +# 498,4 -> 498,6 -> 496,6 +# 503,4 -> 502,4 -> 502,9 -> 494,9 + +# This scan means that there are two paths of rock; the first path consists of +# two straight lines, and the second path consists of three straight lines. +# (Specifically, the first path consists of a line of rock from 498,4 through +# 498,6 and another line of rock from 498,6 through 496,6.) + +# The sand is pouring into the cave from point 500,0. + +# Drawing rock as #, air as ., and the source of the sand as +, this becomes: + + +# 4 5 5 +# 9 0 0 +# 4 0 3 +# 0 ......+... +# 1 .......... +# 2 .......... +# 3 .......... +# 4 ....#...## +# 5 ....#...#. +# 6 ..###...#. +# 7 ........#. +# 8 ........#. +# 9 #########. + +# Sand is produced one unit at a time, and the next unit of sand is not +# produced until the previous unit of sand comes to rest. A unit of sand is +# large enough to fill one tile of air in your scan. + +# A unit of sand always falls down one step if possible. If the tile +# immediately below is blocked (by rock or sand), the unit of sand attempts to +# instead move diagonally one step down and to the left. If that tile is +# blocked, the unit of sand attempts to instead move diagonally one step down +# and to the right. Sand keeps moving as long as it is able to do so, at each +# step trying to move down, then down-left, then down-right. If all three +# possible destinations are blocked, the unit of sand comes to rest and no +# longer moves, at which point the next unit of sand is created back at the +# source. + +# So, drawing sand that has come to rest as o, the first unit of sand simply +# falls straight down and then stops: + +# ......+... +# .......... +# .......... +# .......... +# ....#...## +# ....#...#. +# ..###...#. +# ........#. +# ......o.#. +# #########. + +# The second unit of sand then falls straight down, lands on the first one, and +# then comes to rest to its left: + +# ......+... +# .......... +# .......... +# .......... +# ....#...## +# ....#...#. +# ..###...#. +# ........#. +# .....oo.#. +# #########. + +# After a total of five units of sand have come to rest, they form this +# pattern: + +# ......+... +# .......... +# .......... +# .......... +# ....#...## +# ....#...#. +# ..###...#. +# ......o.#. +# ....oooo#. +# #########. + +# After a total of 22 units of sand: + +# ......+... +# .......... +# ......o... +# .....ooo.. +# ....#ooo## +# ....#ooo#. +# ..###ooo#. +# ....oooo#. +# ...ooooo#. +# #########. + +# Finally, only two more units of sand can possibly come to rest: + +# ......+... +# .......... +# ......o... +# .....ooo.. +# ....#ooo## +# ...o#ooo#. +# ..###ooo#. +# ....oooo#. +# .o.ooooo#. +# #########. + +# Once all 24 units of sand shown above have come to rest, all further sand +# flows out the bottom, falling into the endless void. Just for fun, the path +# any new sand takes before falling forever is shown here with ~: + +# .......+... +# .......~... +# ......~o... +# .....~ooo.. +# ....~#ooo## +# ...~o#ooo#. +# ..~###ooo#. +# ..~..oooo#. +# .~o.ooooo#. +# ~#########. +# ~.......... +# ~.......... +# ~.......... + +# Using your scan, simulate the falling sand. How many units of sand come to +# rest before sand starts flowing into the abyss below? + +with open("/home/xfeluser/AoC_2022/P14.txt") as f: + scan_traces = [line for line in f.read().strip().split("\n")] + + +def cave_generation(): + cave = set() + + for line in scan_traces: + points = line.split(" -> ") + for point0, point1 in zip(points, points[1:]): + x0, y0 = [int(p) for p in point0.split(",")] + x1, y1 = [int(p) for p in point1.split(",")] + for x in range(min(x0, x1), max(x0, x1) + 1): + for y in range(min(y0, y1), max(y0, y1) + 1): + cave.add((x, y)) + + return cave + + +def sand_simulation(deepest): + sand, dirs = 0, [(0, 1), (-1, 1), (1, 1)] + while True: + x, y = 500, 0 + while True: + if y >= deepest or (500, 0) in cave: + return sand + for dx, dy in dirs: + nx, ny = x + dx, y + dy + if (nx, ny) not in cave: + break + else: + cave.add((x, y)) + sand += 1 + break + x, y = nx, ny + + +cave = cave_generation() +deepest = max(y for (x, y) in cave) +print(sand_simulation(deepest)) + + +# --- Part Two --- + +# You realize you misread the scan. There isn't an endless void at the bottom +# of the scan - there's floor, and you're standing on it! + +# You don't have time to scan the floor, so assume the floor is an infinite +# horizontal line with a y coordinate equal to two plus the highest y +# coordinate of any point in your scan. + +# In the example above, the highest y coordinate of any point is 9, and so the +# floor is at y=11. (This is as if your scan contained one extra rock path +# like -infinity,11 -> infinity,11.) With the added floor, the example above +# now looks like this: + +# ...........+........ +# .................... +# .................... +# .................... +# .........#...##..... +# .........#...#...... +# .......###...#...... +# .............#...... +# .............#...... +# .....#########...... +# .................... +# <-- etc #################### etc --> + +# To find somewhere safe to stand, you'll need to simulate falling sand until a +# unit of sand comes to rest at 500,0, blocking the source entirely and +# stopping the flow of sand into the cave. In the example above, the situation +# finally looks like this after 93 units of sand come to rest: + +# ............o............ +# ...........ooo........... +# ..........ooooo.......... +# .........ooooooo......... +# ........oo#ooo##o........ +# .......ooo#ooo#ooo....... +# ......oo###ooo#oooo...... +# .....oooo.oooo#ooooo..... +# ....oooooooooo#oooooo.... +# ...ooo#########ooooooo... +# ..ooooo.......ooooooooo.. +# ######################### + +# Using your scan, simulate the falling sand until the source of the sand +# becomes blocked. How many units of sand come to rest? + + +cave = cave_generation() +even_deepest = deepest + 2 +# 1000 in both directions should be enough +for x in range(-1000, 1000): + cave.add((x, even_deepest)) +print(sand_simulation(even_deepest)) diff --git a/src/Year_2022/Day15.py b/src/Year_2022/Day15.py new file mode 100644 index 0000000..47d3df1 --- /dev/null +++ b/src/Year_2022/Day15.py @@ -0,0 +1,190 @@ +# --- Day 15: Beacon Exclusion Zone --- + +# You feel the ground rumble again as the distress signal leads you to a large +# network of subterranean tunnels. You don't have time to search them all, but +# you don't need to: your pack contains a set of deployable sensors that you +# imagine were originally built to locate lost Elves. + +# The sensors aren't very powerful, but that's okay; your handheld device +# indicates that you're close enough to the source of the distress signal to +# use them. You pull the emergency sensor system out of your pack, hit the big +# button on top, and the sensors zoom off down the tunnels. + +# Once a sensor finds a spot it thinks will give it a good reading, it attaches +# itself to a hard surface and begins monitoring for the nearest signal source +# beacon. Sensors and beacons always exist at integer coordinates. Each sensor +# knows its own position and can determine the position of a beacon precisely; +# however, sensors can only lock on to the one beacon closest to the sensor as +# measured by the Manhattan distance. (There is never a tie where two beacons +# are the same distance to a sensor.) + +# It doesn't take long for the sensors to report back their positions and +# closest beacons (your puzzle input). For example: + +# 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 + +# So, consider the sensor at 2,18; the closest beacon to it is at -2,15. For +# the sensor at 9,16, the closest beacon to it is at 10,16. + +# Drawing sensors as S and beacons as B, the above arrangement of sensors and +# beacons looks like this: + +# 1 1 2 2 +# 0 5 0 5 0 5 +# 0 ....S....................... +# 1 ......................S..... +# 2 ...............S............ +# 3 ................SB.......... +# 4 ............................ +# 5 ............................ +# 6 ............................ +# 7 ..........S.......S......... +# 8 ............................ +# 9 ............................ +# 10 ....B....................... +# 11 ..S......................... +# 12 ............................ +# 13 ............................ +# 14 ..............S.......S..... +# 15 B........................... +# 16 ...........SB............... +# 17 ................S..........B +# 18 ....S....................... +# 19 ............................ +# 20 ............S......S........ +# 21 ............................ +# 22 .......................B.... + +# This isn't necessarily a comprehensive map of all beacons in the area, +# though. Because each sensor only identifies its closest beacon, if a sensor +# detects a beacon, you know there are no other beacons that close or closer to +# that sensor. There could still be beacons that just happen to not be the +# closest beacon to any sensor. Consider the sensor at 8,7: + +# 1 1 2 2 +# 0 5 0 5 0 5 +# -2 ..........#................. +# -1 .........###................ +# 0 ....S...#####............... +# 1 .......#######........S..... +# 2 ......#########S............ +# 3 .....###########SB.......... +# 4 ....#############........... +# 5 ...###############.......... +# 6 ..#################......... +# 7 .#########S#######S#........ +# 8 ..#################......... +# 9 ...###############.......... +# 10 ....B############........... +# 11 ..S..###########............ +# 12 ......#########............. +# 13 .......#######.............. +# 14 ........#####.S.......S..... +# 15 B........###................ +# 16 ..........#SB............... +# 17 ................S..........B +# 18 ....S....................... +# 19 ............................ +# 20 ............S......S........ +# 21 ............................ +# 22 .......................B.... + +# This sensor's closest beacon is at 2,10, and so you know there are no beacons +# that close or closer (in any positions marked #). + +# None of the detected beacons seem to be producing the distress signal, so +# you'll need to work out where the distress beacon is by working out where it +# isn't. For now, keep things simple by counting the positions where a beacon +# cannot possibly be along just a single row. + +# So, suppose you have an arrangement of beacons and sensors like in the +# example above and, just in the row where y=10, you'd like to count the number +# of positions a beacon cannot possibly exist. The coverage from all sensors +# near that row looks like this: + +# 1 1 2 2 +# 0 5 0 5 0 5 +# 9 ...#########################... +# 10 ..####B######################.. +# 11 .###S#############.###########. + +# In this example, in the row where y=10, there are 26 positions where a beacon +# cannot be present. + +# Consult the report from the sensors you just deployed. In the row where +# y=2000000, how many positions cannot contain a beacon? + +with open("/home/xfeluser/AoC_2022/P15.txt") as f: + data = [line for line in f.read().strip().split("\n")] + + +def is_possible(x, y): + for sx, sy, d in sensors: + if abs(x - sx) + abs(y - sy) <= d and (x, y) not in beacons: + return False + return True + + +sensors, beacons = set(), set() +for line in data: + parts = line.split() + sx, sy = int(parts[2][2:-1]), int(parts[3][2:-1]) + bx, by = int(parts[8][2:-1]), int(parts[9][2:]) + d = abs(sx - bx) + abs(sy - by) + sensors.add((sx, sy, d)) + beacons.add((bx, by)) + +count = 0 +y = 2_000_000 +for x in range( + min(x - d for x, _, d in sensors), max(x + d for x, _, d in sensors) +): + if not is_possible(x, y) and (x, y) not in beacons: + count += 1 + +print(count) + +# --- Part Two --- + +# Your handheld device indicates that the distress signal is coming from a +# beacon nearby. The distress beacon is not detected by any sensor, but the +# distress beacon must have x and y coordinates each no lower than 0 and no +# larger than 4000000. + +# To isolate the distress beacon's signal, you need to determine its tuning +# frequency, which can be found by multiplying its x coordinate by 4000000 and +# then adding its y coordinate. + +# In the example above, the search space is smaller: instead, the x and y +# coordinates can each be at most 20. With this reduced search area, there is +# only a single position that could have a beacon: x=14, y=11. The tuning +# frequency for this distress beacon is 56000011. + +# Find the only possible position for the distress beacon. What is its tuning +# frequency? + +import sys + +for sx, sy, d in sensors: + for dx in range(d + 2): + dy = (d + 1) - dx + for mx, my in [(-1, 1), (1, -1), (-1, -1), (1, 1)]: + x, y = sx + (dx * mx), sy + (dy * my) + if not (0 <= x <= 4_000_000 and 0 <= y <= 4_000_000): + continue + if is_possible(x, y): + print(x * 4_000_000 + y) + sys.exit() diff --git a/src/Year_2022/files/P1.txt b/src/Year_2022/files/P1.txt new file mode 100644 index 0000000..96dba2d --- /dev/null +++ b/src/Year_2022/files/P1.txt @@ -0,0 +1,2246 @@ +9057 +8878 +2753 +7027 +3880 +7154 +8022 +6710 +5721 + +4863 +3690 +3333 +1831 +5293 +6258 +1212 +4255 +2331 +3785 +1505 +3355 +3353 +4416 + +5918 +3076 +2145 +2712 +6087 +4310 +1084 +5807 +1342 +2770 +5095 +4696 +5842 +4555 +5388 + +20770 + +3968 +15647 +3933 +15427 +16179 + +40721 + +5837 +4419 +2159 +5173 +5215 +1991 +4842 +5642 +5435 +2853 +1055 +1667 +4361 +2316 +1974 + +24315 +6376 +6153 + +3142 +4989 +8864 +3819 +9260 +1273 +2773 + +9320 +4936 +3707 +2103 +8804 +10586 +2018 +3779 + +4129 +1019 +5054 +9429 +10526 +6314 + +13364 +14437 +14046 +7931 +11712 + +2615 +9583 +7471 +3552 +7532 +5797 +1528 +6479 +2595 + +8758 +1774 +3734 +5159 +7046 +2195 +9245 + +12116 +3801 +10950 +1935 +11450 +1091 +5891 + +7792 +4901 +9062 +8640 +6065 +6405 +3606 +2487 +6606 + +5460 +3272 +1310 +1439 +3753 +3947 +4472 +4155 +2056 +2435 +2235 +3662 +2933 +1110 +1024 + +1590 +6814 +12646 +1548 +13624 +5239 + +3955 +2469 +3104 +1548 +4551 +2307 +4450 +4491 +2233 +4706 +5950 +3395 +6592 + +17731 +18903 + +6164 +7718 +7297 +3277 +3592 +3462 +7405 +6164 +2559 +5171 +3337 + +4797 +9455 +13275 +5801 +12597 +2687 + +3091 +1153 +1733 +5022 +4441 +3163 +2375 +6388 +6061 +1444 +3255 +5828 +4414 +6171 + +2841 +17670 +14820 + +2600 +2598 +14037 +10164 + +10425 +4618 +7656 +6910 +8761 +11429 +11611 + +2787 +4826 +1527 +5024 +4252 +1393 +6744 +5665 +4601 +4129 + +6876 +8156 +7854 +6190 +5234 +8616 +1414 +1076 +5161 + +6343 +7372 +7806 +2309 +7352 +7249 +4239 +5572 +7220 +3920 +6979 + +11380 +9322 +10505 +1250 +1122 +1996 +5199 + +7569 +12600 +14729 +2514 +6841 + +9414 +9386 +10521 +4974 +11016 +11238 +1334 + +21696 +27477 + +11623 +11309 +7708 +6139 +2284 +2789 +4566 + +16850 +5171 +7647 +5516 + +24499 + +4040 +7221 +3197 +7251 +8117 +2221 +1881 +5914 +8381 + +3786 +2055 +5301 +4144 +2543 +1406 +5609 +5064 +2447 +4892 +2306 +1654 +1650 +3528 + +4187 +2576 +11910 +8331 +11613 +9093 +2752 + +4166 +6057 +4585 +1942 +5747 +3102 +2501 +4831 +5681 +6596 +4455 +1125 +4887 + +2083 +10447 +16506 + +4971 +3313 +1821 +1493 +5920 +3617 +4857 +3995 +5608 +3679 +1463 +3539 +2600 +3574 +2636 + +2804 +17188 +6966 +15585 + +13184 +15490 +9948 +14350 +12788 + +31669 + +3318 +2544 +7560 +2170 +9138 +2905 +7010 + +3933 +4835 +4704 +2140 +1896 +4951 +3870 +4241 +2819 +1065 +3605 +5667 +2361 +2642 +1926 + +6614 +3288 +3982 +7283 +7086 +2308 +3237 +7365 +6767 +6931 +5417 +5180 + +40453 + +4946 +4257 +2590 +5342 +3880 +6297 +1472 +2441 +4054 +3490 +5054 + +26102 +29920 + +3726 + +18600 +1537 +7197 +3487 + +8193 +8147 +5901 +1975 +3872 +8834 +1623 +6604 + +4501 +3385 +5321 +6771 +2517 +3943 +2744 +1330 +2277 +2344 +6399 +2090 +3571 + +8236 +6575 +6362 +3878 +7021 +8613 +3520 +3424 +2606 +5607 + +10326 +9793 +3341 +7238 +3008 +8188 +11807 + +3755 +16826 +7885 +11677 + +5980 +6793 +2393 +5757 +2525 +6496 +6420 +6902 +6755 +1023 +4226 +1451 +5006 + +6122 +3263 +4273 +2775 +2251 +1076 +2995 +5662 +4189 +2687 +5552 +6586 +2418 + +9994 +10470 +7802 +9572 +9292 +8390 +8803 +4013 + +28290 + +3210 +9126 +1346 +7538 +11536 +10544 +7409 + +20799 +16110 + +3374 +3818 +1924 +1637 +3258 +5224 +4741 +2689 +1455 +5948 +4813 +3549 +2772 +2562 +4358 + +6843 +10575 +7103 +9314 +9901 +3356 +9120 +4552 + +7709 +3977 +6868 +4640 +4665 +7109 +2662 +5682 +5388 +4256 +7249 + +69796 + +8596 +1275 +2723 +2202 +5544 +3687 +4055 +3062 +4137 +4407 + +4870 +2559 +2177 +5239 +1059 +4440 +2536 +1728 +1520 +2572 +2977 +6815 +4679 + +9042 +8883 +2705 +16255 +7889 + +2318 +4232 +1042 +3075 +6202 +7568 +2519 +5918 +1812 +3750 +3845 + +13323 +33324 + +13742 +1087 +17146 +14863 + +2686 +4132 +5052 +4751 +4695 +4528 +4801 +5741 +6027 +1754 +5633 +2427 +4679 +5777 +3143 + +1533 +4361 +2196 +10184 +3981 +6223 +9273 + +1296 +11261 +5647 +8657 +7235 +1788 + +3467 +5537 +10807 +4793 +3452 +12209 + +5745 +5137 +4002 +4824 +2655 +7597 +5748 +5931 +5264 +4469 +8009 + +4436 +4866 +3784 +5181 +6240 +6027 +3343 +5780 +2258 +6389 +3827 +6496 +6378 +4831 + +5894 +7587 +6913 +10950 +6733 +5617 +8084 + +2446 +5375 +4555 +5327 +1233 +2773 +2701 +5454 +3377 +1217 +5889 +6168 +1056 + +3468 +2402 +7848 +5652 +1448 +1954 +1021 +7860 +4305 + +2234 +17391 +5472 + +2028 +5812 +3091 +5508 +5531 +3554 +3706 +2667 +5670 +4845 +2749 +5569 +4811 +3090 +1063 + +2144 +5088 + +20000 +9957 +9049 +3092 + +12235 +6601 +3496 +16002 +1378 + +8800 +1236 +5552 +5693 +8482 +3003 +1126 +4612 +5833 +8430 + +6223 +4640 +1392 +2667 +1602 +2308 +4433 +4148 +6467 +1817 +2926 +3884 +6015 + +2273 +3007 +4509 +2902 +4170 +2731 +4409 +4873 +4237 +2667 +4243 +5788 +3673 +4582 +4696 + +27388 +26736 + +44158 + +4877 +2172 +5968 +1222 +6456 +6920 +3593 +3631 +7213 +3968 +2398 +7264 + +7126 +30978 + +4024 +2766 +2721 +2774 +2807 +1584 +2429 +3517 +5260 +4234 +2381 +5066 +4204 +4737 +4031 + +1528 +2205 +4533 +5873 +1587 +2708 +4198 +5560 +3413 +4058 +1799 +1088 +4285 +6233 + +44226 + +12933 +6090 +14830 + +5766 +2184 +2552 +4757 +1895 +2328 +1265 +5829 +2645 +6110 +6499 +5920 +6421 +2505 + +5039 +6271 +5081 +10068 +3856 +7103 + +5441 +2606 +1249 +2526 +1241 +1914 +3734 +4464 +3855 +4761 +5528 +1419 +2772 +1825 + +3554 + +8766 +2123 +7372 +7752 +6260 +5632 +3802 +9546 +7769 + +9108 +4838 + +1374 +3720 +7558 +4646 +6793 +4704 +3361 +8038 +6147 +2160 +1983 + +3133 +3621 +6073 +2533 +1644 +5277 +4276 +1921 +6251 +5273 +1571 +3769 +2155 + +2721 +3793 +4935 +2950 +2399 +1083 +4213 +4958 +1139 +1140 +2454 +3291 +3865 +1667 +4798 + +5676 +5904 +1356 +1439 +3241 +2933 +4164 +3887 +4712 +2759 +4390 +1274 +6220 +2557 + +2049 +4787 +1819 +3172 +5511 +1006 +1373 +6094 +3054 +4914 +6057 +4883 +2867 +5363 +3916 + +11348 +3724 +6793 +7336 +4032 +11297 + +4231 +4277 +2982 +2408 +5673 +6805 +4710 +7659 +6866 + +2950 +4018 +6167 +8316 +7308 +4955 +8341 +1512 +3167 +8493 + +15665 +14654 +1249 +15313 +4636 + +1494 +3325 +5902 +1393 +6813 +3900 +2827 +5936 +6589 +6847 +4658 + +11492 +14548 +5203 +15187 +5937 + +1358 +2801 +1086 +5190 +4022 +5013 +3511 +4398 +1774 +2194 +1887 +5704 +2012 +1259 + +4763 +2250 +6915 +4281 +1246 +7242 +6049 +5113 +1187 +2486 +6688 +3275 + +22345 +1336 +11325 + +6000 +3641 +1082 +2924 +5477 +3336 +4126 +3981 +5359 +1053 +4299 +5952 +4655 + +46233 + +17242 +6366 +7866 + +12504 +4031 +12664 +9756 +12750 + +3373 + +3091 +11142 +15034 +1144 +11747 + +3129 +2007 +8482 +7205 +7734 +8770 +2213 +5582 +5437 +3223 + +4471 +2591 +3286 +4446 +5388 +3600 +3357 +2644 +5028 +5569 +5055 +3284 +5597 +4116 +1076 + +3792 +2354 +8030 +3269 +2483 +1302 +7427 +6148 +3836 +7834 +1663 + +2930 +5964 +1707 +2899 +4160 +2193 +2705 +5799 +4612 +2741 +2333 +4969 +3117 +5276 +1747 + +62287 + +4321 +22825 +5690 + +7287 +1774 +4464 +2273 +2903 +8920 +4092 +8072 +8763 + +8885 +7470 +3145 +3523 +5647 +1067 +3048 + +6923 +6463 +4032 +5923 +1982 +4331 +6323 +1192 +5583 +5470 +6476 +5889 +2991 + +6697 +1560 +5520 +4516 +4845 +3035 +6047 +4906 +4596 +1934 +7245 +4476 + +4001 +7227 +5720 +3195 +8505 +6612 +4012 +4050 +8659 +3804 + +8332 +3362 +4926 +4307 +4779 +1856 +7350 +4068 +8592 +2415 + +60630 + +4263 +1716 +8004 +5253 +2004 +5381 +5614 +3020 +5985 +5587 +3563 + +18645 +10906 +3077 +2255 + +59591 + +3203 +7739 +2234 +1421 +3353 +5031 +6395 +5614 + +6259 +8748 +4341 +7788 +1074 +8497 +3996 +1294 +5197 +5779 + +10765 +5009 +3541 +2298 +10698 +13317 + +6181 +1305 +6527 +2125 +9085 +2889 +8794 +3265 +4166 + +3607 +1912 +1927 +6455 +1043 +6949 +2542 +1552 +3064 +2009 +6587 + +5574 +4632 +5869 +4312 +1703 +6124 +6479 +4556 +5917 +5890 +4949 +5614 +5576 + +2267 +7221 +5412 +5721 +2931 +3149 +6934 +3520 +6237 +4317 +1295 +6450 + +12143 +7105 +2050 +9391 +3017 +10750 + +4649 +2052 +1856 +3055 +2132 +6630 +5964 +5505 +3395 +2080 + +4388 +6963 +2613 +1055 +6588 +1348 +3752 +5538 +4524 +7994 +3977 + +5444 +6078 +8572 +10427 +5423 +3812 +1984 + +9248 +17691 +12948 +17445 + +5807 +3737 +5304 +1495 +5162 +1178 +6053 +5597 +5645 +2267 +4333 +3455 +4086 +2024 +4127 + +5502 +3665 +3494 +1502 +4702 +4563 +5216 +6486 +1931 +6493 +4618 +3960 +1149 +5109 + +2198 +1411 +4511 +1913 +4173 +4446 +6176 +2305 +4748 +4560 +4048 +5361 +4481 + +30924 + +15726 +4014 +20018 +2880 + +3345 +2576 +4787 +2186 +2156 +2989 +4400 +5147 +5393 +2830 +5869 +4839 +2860 +2134 + +2400 +2009 +2634 +4431 +7342 +5534 +2072 +5520 +5518 +2998 +3686 +4906 + +10948 +12532 +11104 +7815 + +5883 +6111 +4117 +3590 +3295 +3984 +2950 +6814 +1123 +4642 +1770 +2029 +4406 + +19302 +1549 +10378 +13976 + +4852 +7261 +4206 +12867 +8400 +11611 + +2587 +3559 +1415 +5308 +3732 +6752 +3804 +1720 +2570 +5106 +6658 +5105 +6156 + +7380 +10456 +8378 +10778 +9788 +1299 +10299 + +3596 +5969 +8288 +3025 +8196 +6410 +5966 +3060 +3015 +1270 + +14103 +5510 +13362 +19169 + +3056 +3546 +7784 +2262 +3791 +3159 +5386 +6489 +3421 +7995 +4498 + +27239 + +9345 +8921 +5252 +1154 +3189 +1175 +3216 +3282 +9392 + +2821 +7731 +8002 +1351 +5951 +4544 +3688 +4855 +8082 +1428 +5613 + +6506 +2529 +6614 +3938 +4404 +5581 +1984 +6242 +7589 + +8393 +6631 +5200 +9914 +10229 +2405 +3933 +9333 + +6766 +3486 +11457 +3098 + +5091 +4105 +1368 +4682 +3094 +4077 +5876 +1958 +1641 +3925 +2969 +3780 +5489 + +10434 +2285 +2830 +6976 +3561 +6756 + +3944 +2998 +1874 +4642 +4634 +2155 +2221 +2270 +2446 +1514 +5382 +4333 +5441 +2412 +1789 + +2433 +4036 +6005 +1551 +7281 +8466 +2141 +4190 + +5103 +6956 +5839 +2237 +7177 +6397 +11533 + +7100 +3476 +4592 +6502 +3322 +10524 +2973 +10712 + +3440 +1323 +1316 +1979 +1168 +6432 +3512 +5739 +2131 +4504 +5233 +3726 +6371 +6125 + +1917 +3442 +4104 +6123 +1657 +3139 +1690 +3323 +1269 +1407 +5603 +4819 +1787 +2340 + +11143 +9483 +9438 +12565 +7187 +13478 + +6406 +2289 +8029 +1790 +5009 +6300 +2521 + +8040 +6772 +3244 +5246 +6455 +6715 +4024 +3855 +6458 +4945 +4207 + +4628 +4872 +3344 +5675 +3761 +4467 +5113 +5746 +4140 + +9532 +1992 +5741 +8559 +4606 +6310 +5183 + +7530 +13402 +8481 +8327 + +17909 +7813 +12567 +9674 + +3329 +6032 +5539 +5513 +2555 +4767 +1085 +3329 +5138 +4448 +4082 +5569 +2732 +3326 + +2019 +3327 +3701 +3145 +1943 +1467 +1913 +5141 +7475 +7026 +4964 +2353 + +3375 +1186 +2890 +1248 +5696 +5993 +3804 +1133 +2035 +5068 +4280 +2123 +1890 + +8675 +10684 +22636 + +2704 +1093 +9357 +7940 +4843 +1118 +5533 +8943 +6492 + +67791 + +7101 +3406 +8840 +3652 +9258 +5329 +4562 +5314 +9146 + +3673 +13526 +2792 +5659 +13396 +8400 + +2492 +5265 +5244 +2173 +5032 +1182 +1486 +4561 +4673 +2480 +5148 +1375 +1093 + +1368 +5899 +6527 +7584 +2148 +2960 +7701 +5381 +6149 +2589 +7496 + +12206 +11842 +11444 +12447 + +3417 +5044 +7116 +5491 +9020 +8610 +1047 +5725 +2712 + +9153 +1836 +3337 +1686 +6044 +8786 +7476 +1688 + +17559 +10138 +16446 + +15625 +16403 +16979 +7402 + +3561 +2910 +12805 +8128 +13171 +5786 + +1332 + +1135 +5954 +9216 +5471 +3494 +9353 +6330 +4152 + +2031 +2180 +1544 +2509 +3894 +2882 +1460 +6647 +4655 +3164 +6691 +2156 +5754 + +2309 +5397 +6055 +5585 +9712 +9731 +9274 + +9865 +7291 +4863 +10688 +4135 +4572 +7321 +5603 + +1428 +5533 +4032 +1648 +1676 +5556 +1186 +4594 +5915 +2477 +4923 +5393 +2101 +2509 +1250 + +2388 +2255 +3768 +5340 +4357 +5600 +4198 +6423 +5974 +5673 +3717 +3275 +5871 +3250 + +11192 +1266 +3583 +10707 +11653 +3264 +6641 + +2009 +12343 +2394 +2147 +1560 +4352 + +5152 +6000 +6725 +3479 +1229 +1599 +3971 +6829 +8654 + +7486 +15798 +2011 +9551 +15283 + +8934 +27039 + +2048 +7506 +3661 +7298 +8557 +6387 +6496 +4471 +8596 +5325 + +1760 +2615 +1038 +9295 +6394 +7329 +5015 +4727 +9584 + +40347 + +5992 +9771 +14112 + +13049 +14348 +13202 +10630 +9351 + +8778 +9152 +10173 +8648 +4552 +4300 +5921 +9924 + +26578 +34718 + +2974 +3130 +4319 +4116 +3484 +5362 +5583 +2885 +4526 +2756 +5977 +2629 +2429 +1755 +1278 + +2848 +4821 +2207 +6922 +6699 +1999 +2354 +1922 +2133 +4496 +2510 +6509 +6929 + +5345 +3244 +2145 +1243 +1245 +2210 +5939 +3311 +6482 +5700 +3395 +2508 +3893 +6405 + +3618 +2718 +4854 +1334 +3478 +3043 +3466 +1028 +2627 +3873 +4878 +5160 +6017 +4880 +1342 + +9909 +7167 +7465 +7787 +10618 +6259 +3751 +1488 + +24782 +13684 +1905 + +5325 +9319 +7321 +6398 +8841 +3773 +2807 +9032 +2572 + +5346 +7500 +8693 +9429 +1728 +1303 +2467 +3959 +8196 + +6220 +6193 +4246 +3802 +6433 +4710 +3059 +2880 +6077 +1924 +5892 + +3421 +1973 +9474 +3990 +15878 + +6757 +9558 +9440 +8896 +5221 +3819 +6669 +1578 +7307 + +2015 +5934 +2351 +4738 +6504 +1748 +5112 +4067 +1623 +1944 +6297 +3300 +1089 + +1757 +4617 +8124 +6837 +4685 +9532 +11427 + +9094 +6552 +3882 +5341 +10752 +5572 +5882 + +5806 +3599 +1885 +4608 +6756 +4656 +1160 +4783 +2759 +3006 +3044 +5491 +6877 + +6295 +18921 +23198 + +2201 +2488 +1050 +1414 +2799 +3883 +7092 +4746 +3719 +3211 +1548 + +2656 +3600 +5148 +2300 +5547 +8226 +6952 +2611 +2268 +6490 + +5499 +8937 +12091 +1429 +9253 +2187 +2660 + +12898 + +3536 +3120 +6811 +2427 +2710 +2100 +2030 +7003 +3932 +3514 +6390 +6017 + +7645 +3909 +2219 +2290 +1401 +1812 +3180 +7733 +2547 +2653 diff --git a/src/Year_2022/files/P10.txt b/src/Year_2022/files/P10.txt new file mode 100644 index 0000000..50f6b08 --- /dev/null +++ b/src/Year_2022/files/P10.txt @@ -0,0 +1,140 @@ +noop +noop +noop +addx 5 +noop +addx 1 +noop +addx 4 +addx 25 +addx -20 +noop +noop +addx 5 +addx 3 +noop +addx 2 +noop +noop +addx -1 +addx 6 +addx 1 +noop +addx 4 +noop +addx -37 +noop +noop +noop +addx 3 +addx 32 +addx -25 +addx 2 +addx 3 +noop +addx 2 +addx 3 +noop +addx 2 +addx 2 +addx -24 +addx 25 +addx 5 +addx 2 +addx 8 +addx -23 +addx 18 +addx 5 +addx -39 +addx 11 +addx -9 +addx 6 +addx -2 +addx 5 +addx 4 +addx -4 +addx 3 +addx 5 +addx 2 +noop +addx -1 +addx 6 +addx -21 +addx 22 +addx 3 +addx 1 +addx 5 +noop +noop +addx -35 +noop +noop +noop +noop +addx 37 +addx -33 +noop +addx 6 +addx 2 +addx -1 +addx 3 +addx 1 +addx 5 +addx 2 +addx -19 +addx 21 +addx 1 +addx 5 +addx -31 +addx 36 +noop +addx 3 +addx -2 +addx -38 +noop +noop +addx 7 +addx 14 +addx -4 +addx -7 +addx 5 +addx 2 +addx 12 +addx -15 +addx 6 +addx 2 +addx 5 +addx -27 +addx 25 +addx 5 +noop +addx 7 +addx -2 +addx 5 +addx -40 +noop +addx 7 +noop +addx -1 +addx 2 +addx 5 +addx -1 +addx 1 +addx 2 +addx 7 +noop +addx -2 +noop +addx 3 +addx 2 +addx 7 +noop +noop +addx 1 +noop +noop +addx 3 +addx 1 +noop +noop +noop diff --git a/src/Year_2022/files/P11.txt b/src/Year_2022/files/P11.txt new file mode 100644 index 0000000..2af0021 --- /dev/null +++ b/src/Year_2022/files/P11.txt @@ -0,0 +1,55 @@ +Monkey 0: + Starting items: 63, 57 + Operation: new = old * 11 + Test: divisible by 7 + If true: throw to monkey 6 + If false: throw to monkey 2 + +Monkey 1: + Starting items: 82, 66, 87, 78, 77, 92, 83 + Operation: new = old + 1 + Test: divisible by 11 + If true: throw to monkey 5 + If false: throw to monkey 0 + +Monkey 2: + Starting items: 97, 53, 53, 85, 58, 54 + Operation: new = old * 7 + Test: divisible by 13 + If true: throw to monkey 4 + If false: throw to monkey 3 + +Monkey 3: + Starting items: 50 + Operation: new = old + 3 + Test: divisible by 3 + If true: throw to monkey 1 + If false: throw to monkey 7 + +Monkey 4: + Starting items: 64, 69, 52, 65, 73 + Operation: new = old + 6 + Test: divisible by 17 + If true: throw to monkey 3 + If false: throw to monkey 7 + +Monkey 5: + Starting items: 57, 91, 65 + Operation: new = old + 5 + Test: divisible by 2 + If true: throw to monkey 0 + If false: throw to monkey 6 + +Monkey 6: + Starting items: 67, 91, 84, 78, 60, 69, 99, 83 + Operation: new = old * old + Test: divisible by 5 + If true: throw to monkey 2 + If false: throw to monkey 4 + +Monkey 7: + Starting items: 58, 78, 69, 65 + Operation: new = old + 7 + Test: divisible by 19 + If true: throw to monkey 5 + If false: throw to monkey 1 diff --git a/src/Year_2022/files/P12.txt b/src/Year_2022/files/P12.txt new file mode 100644 index 0000000..4994f18 --- /dev/null +++ b/src/Year_2022/files/P12.txt @@ -0,0 +1,41 @@ +abccccccccccccccccaaccccccccccccccccccccaaaaaaaaaaaaacccccccccccccccccccccccccccccccccccccccccccccccccccccccaaaaaa +abcccccccccccccaaaaaccccccccccccccccccccaaaaaaaaaaaaaccccccccccccccccccccccccccccccccccccccccccccccccccccccccaaaaa +abccccccccccccccaaaaaccccccccccccccaaaaacccaaaaaacccccaaccccccccccccccccccccccccccccccccccccccccccccccccccccccaaaa +abccccccccccccccaaaaacccccccccaacccaaaaacccaaaaaaaccccaaaacaacaaccccccccccccccccccccccccaaaccccaaaccccccccccccaaaa +abcccccccccccccaaaaacccccccaaaaaccaaaaaacccaaaaaaaacaaaaaacaaaaaccccccccccccccccccccccccaaacccaaaaccccccccccccaaac +abccccccaacaaaccccaaccccccccaaaaacaaaaaaccaaaacaaaacaaaaaccaaaaaaccccccccccccccccccccccccaaaaaaaacccccccccccccaacc +abccccccaaaaaaccccccccccccccaaaaacaaaaaaccaaaaccaaaacaaaaacaaaaaacccccccccccccccccccccccaaaaaaaaaccccccccccccccccc +abccccccaaaaaacccccccccccccaaaaaccccaaccccaacccccaaccaacaacaaaaaccccccccccccccccccccccccccaaakkkkllllcccaaaccccccc +abccccccaaaaaaacccccccccccccccaaccccaacccccccccccccccccccccccaaaccccccaaaacccccccccjjjjkkkkkkkkkkllllccccaacaccccc +abcccccaaaaaaaacccccaaccccccccccccccaaaaaaccccccccccccccccccaaccccccccaaaaccccccccjjjjjkkkkkkkkkppllllcccaaaaacccc +abcccccaaaaaaaaccaaaacccccccccccccccaaaaaccccccccccccccccaacaaccccccccaaaacccccccjjjjjjjkkkkkppppppplllccaaaaacccc +abccccccccaaaccccaaaaaacccccccccccaaaaaaaccccccccccccccccaaaaacccccccccaacccccccjjjjoooooooppppppppplllcccaaaccccc +abccccccccaaccccccaaaaaccccaacccccaaaaaaaaccccaaacccccccccaaaaaaacccccccccccccccjjjooooooooppppuuppppllcccaaaccccc +abccccccaacccccccaaaaacccccaaaccaaaaaaaaaaccaaaaaaccccccaaaaaaaaaacaaaccccccccccjjjoooouuuoopuuuuupppllcccaaaccccc +abacccccaaccccccccccaacccccaaaaaaaccaaaaaaccaaaaaaccccccaaaaaccaaaaaaaccccaaccccjjoootuuuuuuuuuuuuvpqlllcccccccccc +abaccaaaaaaaacccccccccccccccaaaaaaccaacccccccaaaaacccccccacaaaccaaaaaaccaaaacaccjjooottuuuuuuuxyuvvqqljjccddcccccc +abcccaaaaaaaaccccccccccccaaaaaaaaacaacaaccccaaaaaccccccccccaaaaaaaaaacccaaaaaacciijootttxxxuuxyyyvvqqjjjjdddcccccc +abcccccaaaaccccaaacccccccaaaaaaaaacaaaaaccccaaaaaccccccccccccaaaaaaaaacccaaaaccciiinntttxxxxxxyyvvqqqqjjjddddccccc +abccccaaaaaccccaaaaacccccaaaaaaaaaaaaaaaaccccccccccccccccccccaaaaaaaaaaccaaaaccciiinntttxxxxxxyyvvvqqqqjjjdddccccc +abccccaaaaaaccaaaaaccccccccaaaaaaaaaaaaaacccccccccccccccccccccccaaacaaacaacaaccciiinnnttxxxxxyyyvvvvqqqqjjjdddcccc +SbccccaaccaaccaaaaacccccccccaaaaaaaaaaaaacccccccccccccccccccccccaaacccccccccccciiinnntttxxxEzzyyyyvvvqqqjjjdddcccc +abcccccccccccccaaaaacccccccaaaaaaaaacaaaccccccccccccccccccccccccaaccccccccccccciiinnnttxxxxyyyyyyyyvvvqqqjjjdddccc +abcccccccccccccaaccccccccccaaaaaaaaccccccccccccccccccccccccccccccccccccccccccciiinnntttxxyyyyyyyyyvvvvqqqjjjdddccc +abccccccccccccccccccccccccaaaaaaaacccccccccccccccccccccccccccccccccccccccccccciiinntttxxxwwwyyywwvvvvrqqjjjjdddccc +abcccccccccccccccccccccccccccaaaaaaccccccccccccccccccccccccccccccccccccccccccciinnntttxwwwwwyyywwvvvrrrqkkkeddcccc +abcccccccccccccccccccccccccccaaaaaaccccccccccccccccccccccccccccccccccccccccccchhnnntttsswwswwyywwrrrrrrkkkkeeecccc +abcccccccccccccccccccccccccccaaaaaacccccccccccccccccccaccccccccccccaaacccccccchhhnmmssssssswwwwwwrrrkkkkkeeeeecccc +abcccccccccccccccccccccccccccccaaacccccccccccccccccccaaccccccccccaaaaaacccccaahhhmmmmmsssssswwwwrrrkkkkkeeeeeccccc +abaacccccccccccccaccccccccccccccccccccccccccccccccaaaaacaacccccccaaaaaacaaaaaahhhhmmmmmmmmssswwwrrkkkkeeeeeacccccc +abacccccccccccccaaaaaaaaccccccccaaacccccccaaccccccaaaaaaaacccccccaaaaaacaaaaaaahhhhmmmmmmmmsssrrrrkkkeeeeeaacccccc +abaaaccccaaccccccaaaaaacccccccccaaacccaacaaaccccccccaaaacccccccccaaaaacccaaaaaaahhhhhhhmmmmlsssrrllkfeeeeaaaaacccc +abaaaccaaaaccccccaaaaaacccccccccaaaaaaaaaaaaaacccccaaaaacccccccccaaaaacccaaaaaaachhhhhgggmllsssrrllkffeaaaaaaacccc +abaacccaaaaaacccaaaaaaaacccccaaaaaaaaaaaaaaaaacccccaacaaacccccccccccccccaaaaaacccccchggggglllllllllfffaaaaaaaacccc +abaaccccaaaacccaaaaaaaaaaccccaaaaaaaaacaaaaaaaccaccaccaaacccccccccccccccaaaaaacccccccccgggglllllllffffaaaaaacccccc +abcccccaaaaacccaaaaaaaaaacccccaaaaaaaccaaaaacccaaaccccccccccccccccccccccccccaacccccccccagggglllllffffccccaaacccccc +abcccccaacaaccccccaaaaacaccaacccaaaaaaaaaaaaaccaaacccccccccccccccccccccccccccccccccccccaagggggffffffcccccccccccccc +abcccccccccccaaaaaaaaacccccaaccaaaaaaaccaaaaacaaaaccccccccccccccccccccccccccccccccccccaaaacgggfffffccccccccccccccc +abcccccccccccaaaaacaacccaaaaaaaaaaccaacccaaaaaaaacccaaccccccccccccccccccccccccccccccccccccccggfffccccccccccccaaaca +abccccccccccaaaaaaccccccaaaaaaaaacccccccccaaaaaaaaaaaacccccccccccccaaaccccccccccccccccccccccaaaccccccccccccccaaaaa +abccccccccccaaaaaaccccccccaaaacccccccccccccaaaaaaaaaaaaccccccccccccaaaaccccccccccccccccccccccaaaccccccccccccccaaaa +abcccccccccccaaaaacccccccaaaaaaccccccccccaaaaaaaaaaaaaaccccccccccccaaaaccccccccccccccccccccccccccccccccccccccaaaaa diff --git a/src/Year_2022/files/P13.txt b/src/Year_2022/files/P13.txt new file mode 100644 index 0000000..61f439b --- /dev/null +++ b/src/Year_2022/files/P13.txt @@ -0,0 +1,449 @@ +[[[0,10]],[7,9,[[2,1],[7]],4,[[5,0,5,7,8],0,0,[10,3,3,2]]],[[1,[3,8,8,6,8],6,[1,3,7,9],[9,1,1,7]],[],[[1,0,4,10],8,5]],[]] +[[10,3,[[4],0,8]],[7,6,[]]] + +[[[5,[10,4,3,10,1]],1],[[[3,1,4,6,2],[3,9,3,9],[0,0],[8,10,2,6,6],9]],[10,[[]],5,5],[8,[9,2,4,7]],[4,4]] +[[[[]],[[8],[],[5,1]],4,1]] + +[[8,9,[[],8,10]],[[4,[0,7,9,5,5],[8,3,4,6],9,6],4,[7,[2,1,7,4,10]],3,4],[7,4,[[3],5,[0,9]],10],[4,[],4],[2,2]] +[[3,[8,[1,8,3],[0,10],7],[[8,6,2],[10,7,6,7],4,[1,9,4,6,9]],[[10,5,10],4,[4,1,2,2,8]],[4]],[],[6,6,[[7,6],[5,6,7,5,7]]],[[[0,1,5],0,0,6],[]],[]] + +[[0,7,[]],[],[[],[6,3,[4,8,4,2,1]],[[5,8,9],[],[4,10,1],[],6],3],[8],[5]] +[[0,3],[0,9]] + +[[],[8,[],5],[]] +[[9]] + +[[],[[10,[10],[8,3,3,5,1],[4]]],[5,5],[],[[[3,9,1],7,5,5],8,[[],[0,7,7,2],2]]] +[[6,8],[[],2,[[],10,6,[8,4],9]],[[],7,[[0,0,3]],4,9],[5,[],[[2,3,5,10],7,[2],[0,2],[7,10]],7,[[7],4,[5,2,10],10]],[[[1,2,5,1,0],[10,0]],[[7,6,8,6],[],3,6],[[6,2,2,4],5,[8,4,3,6,5],4,[3,0,8]],[],0]] + +[[9,0,[[9],1,7,[3,8,0,1]]],[[],[1,[0,8,10]],7,6],[7,10,[1]],[[[8,4],0],1],[5,[[],6,[6,9,8]]]] +[[[[],3,[0,1,6,0]]],[1,[[6],10]],[[[],1,[2,8]]],[[[10,9,10,2],[1,2,10],[9,7,7,6,5],[5,9,2,4]],[[5,10]]]] + +[[],[1,3],[9,[[1]],5,5],[[[4],[2],7],8],[[[],[2,6],[9,3,4,8,6],2,[9,8,7,9,8]],10]] +[[7,[3],[[3,0],[4,0,0,5,5],[10,7,2,10],5,[2,4]]],[[5,1,2,9],[[8,4],[3]],9],[]] + +[[10,[]]] +[[[4],[3,4,2]],[3,[[],[6,5],6,4,[8,4,5]],[],[3,[],4,[0]],3],[7,[[0]],[[],[5,9,5],4,[2,3]]]] + +[[10,2,4],[],[]] +[[4,[7,0,9]]] + +[[[6,8],4,[]],[[[7,4,6],[1],[0,1,0],[],3],[2],6,[[2,10],4],4],[[8,[0,1,5,10,1],8],10]] +[[8,[4,8,[2,9,3]]]] + +[[4,1,4],[[[3],8],0],[],[],[[[2,3,0],0],8]] +[[5,8,4,[6],4],[7,[[4,5,2,8],4,[9,1],9,9]],[]] + +[[7,3],[2,[],[],[5,8,[],[]]]] +[[1,[2,[],9,[2,9,3]]]] + +[[8,2,5,5,7]] +[[],[10,5,6],[7,[],0],[9,[[7,9],[5,4,10],[9,8],1,3],7,10,[]]] + +[[2,7],[],[6,[5,1,[2,5,1],[6,7,3,4,4],9]],[0,[1,6,[5,3,1],[5,3,8],5],7]] +[[[],[]],[]] + +[[[3,[4,1],8,10],[[2,7,6,0]],5,0],[7,[[2,5,7],[0,8,8],[]],0,9],[[3,[3,7,2,1]],0,[10],3,[]],[]] +[[8,[1],8,0],[9,[[10,1,9],[],0,[8,5,7,0,0]],0,[1,[6],6]],[[1],[1,[]],[8,4,[8,5,6,4,7],[9,2],8],2,[0,[9,2,7]]],[[9,[4,1,8,7,0],5],6,8,0,2],[[2,0],10,[[4,6,2,0]],[[]],[[]]]] + +[[[[10],[],[],[0,4,8,0]],4,1,1],[[[2,3],[],[7,7,2,10],2]],[1,10],[[[6,10,7,6,2],[0]],4,5,[1,5,[6],5,[10]],[7,[3],0]]] +[[[],[3,1,[7],3],[[7,8,7,1,10],[7],2],3,[7,4]],[10,[9],3,[8,[8,5,10,2,8]],2],[[[5,2,10]]]] + +[[10,[1,[5,3],[4],3,0],[[3,2,1,0,0],[]]]] +[[5,5],[0,8]] + +[[[]],[[8,[8]],[[],[2,8,10],[7,5,10,0,3]]],[[[1],[5]],2,[[9,5,8,2,0],2,7,6],[[8,5,0,3,8],[9,1,3,7],[5,7,7,8,3],[]]],[[1,0,[5,6,8,2],6],[9,1,[4,7,7,5],3,[]],[6,0,[8],4]],[[3,10,[6,10,7],8]]] +[[0,7],[0,1,[8,[9],[4,10]],[[8,7,3,2,9],4,7,[],6]],[[[5,8],[1,5,5]],7,9,6],[],[8,[[8,0,2,6],1,[],3],3,1,5]] + +[[[],[5]],[3,6,[],5],[[[2,7,5,0],[0,7]]],[[10,10,[1]]]] +[[0,[5,8,[10,2,9,0,1],[3,1,7],7],[[6],2],5]] + +[[[[9,4,9,10,5],7,2],8,0,[]],[],[9,7]] +[[8,[2,[9,0,9,0],2,[6,10,8,10,5],8],1,9,6],[4,9],[0,4,7,[0],[1,[7,1],[],5]]] + +[[4,[],7],[]] +[[[4,5],[[5,1],4,[],0,[9,9]],2,7,3]] + +[[[[6,7,2]],[3,9],5,[[1],[0],[6],[7],[]]],[[2]],[10,[8,[6,3,5],2],1]] +[[[[6,5,6,9],10],[7,2,2,7,[7,6,10]],9,3],[6,[3,5,8,[10,4,6,1,1],2]]] + +[[[10,[2,10]]],[[[6,3,5,8]],[[10,2,10,1],9,5,7]],[]] +[[1,0,[[7,1,8,1],6],3]] + +[[],[],[1,[9,6,4,7],4,[]],[[],0,3,[[2,10,9,2],2,7,[],[1]],[2,[],8,8]]] +[[7,3],[],[2,8,[[],7,[8,7],[8,1,2]],8],[]] + +[[],[],[[[],[1],3,[10,6,0,8],[10,4,6,9,0]],[],1,1]] +[[6,10,0]] + +[[10,[5,[3,0,1,2],[5],2],[[3,1,0,2,7],5],5],[8,[[10,7]],[[10,2,10,10,8],[]]],[3,[6],5,[[6,10],[6,2,5,9,4]]]] +[[[1,[1,3,1],0,[4]],[],8],[[5],[[7,8,9],[],[]]],[[5,[1,6,6,1,0]],6,6,[[10,10,8,3],[9,8,7],[10,0,2,5,3]],4]] + +[[[],7],[[[3,0,8,8,2],7,9,8]]] +[[[1],[7,3,[8,4,2,7,3],[0,1],10],1]] + +[[8],[9,[4,[5,1],[6,6,9,7],2,[4,7]],2],[9,6]] +[[[[2,10],2],4,7],[[7,[],[10,7,10,6,4],[3,2,7,9]],0,6,[4,1,[4]]],[[6,1,10,4]]] + +[[[[1],[3,8,3,1]],[0,[1,1],0],3],[],[],[[[]],[],[[0,7,0,0,1]],[]],[7,[9,10,[3,4,6,4,8]],[3,7]]] +[[[2],10,6,[2,2,[4]],[1,[4,9,8],2]],[[8],1],[4,10],[10,[8,[]],3,8,[]]] + +[[[[4]],[5],[[2,9,0],8],[]],[[],4,3,[[2,3,6]],[[2],3,[],[9,0],[9,7,1]]],[[10,[]],[],5,[[3],[4,4,8,8,2],[0,6,6,10]]]] +[[[[4,8,0,9]],[1,1],2,8,[[10,5],[4,7,7,7]]],[[9,10,8],[],[[0,2,10,0,6]]],[2],[]] + +[[6,8]] +[[9,9,[[9,8,4],[6,1,1,7],8]]] + +[[],[[0],7,[[5,10],3,[],10,[]],2],[4]] +[[],[7],[[9,7,9,8,4],6,9,1,[]],[[10,[9,2,7,6],[2]]],[[2,[6,2,0,8,3],[3],[6,10,7]],[2],5]] + +[[6,3,[7,3,3,4,4],[],[10,0,3,7,6]],[7,[[2,3,10,3,0],[],0,3,9],[[4],6],0,2],[]] +[[10,0,[[9,1,5],4,10,[2,3]],2,[]],[]] + +[[[[10,1,5,4],9,[6],[10]]],[[[6,7],5,[4]]]] +[[7,[0,[]],6,3,10],[[7,0],9],[10,[1],[3,[],3,1]]] + +[[0,0,3,[],[3]],[],[10,[2],[[5],4],[[6,0],8,5,[]]],[]] +[[],[[[4,5]]],[]] + +[[[[3,0,4,3,2],7]],[4,10,1,[7,2,5,7,3],2],[],[[5,[8,1,2],[6],[0,6,6,5],[4,9,4,5,8]],7,0,9],[]] +[[[[7,10]],[[10,0],[1,9],1,3]],[2],[[2],5],[[4,[],6,9]]] + +[[[0]],[],[[[],[5,1,6,10]],[],[1],2],[0,[3,1,1],8]] +[[[1,[4],1],3,[9],2],[],[1,[],[],1,[10,5,0,[]]],[[[10,3,5,2,6],8,10,[10,4,10,10]]]] + +[[1,[2,[10,8,2,1,1]],0]] +[[[1]],[[[2,4,10,2],[]],3,8],[9,3,[5,[3,0],[0],[4]],6,[[9,8,3,7],4,[10,10,8],10,[6,6]]],[[[3],7,[],[10,5]],0],[5,[[3,9,0,2,1],0,[4,5,2],[6]]]] + +[[[]],[[[8,9,10,8],[6,5,4,10,10],[8,10,0,2,0],[1,7,1],[]],[[]],7]] +[[],[],[8,10]] + +[[],[8],[]] +[[[10],[0,[]],[3,[]],[[5,6,2,0]],3]] + +[[5,7,1,3]] +[[[],[[],[4]],5,[7,[8,5]]],[[],8],[7],[9,[],1,[[7,1,6,7,10],[7,4,6],[10],7,[10,5,4,6,4]],6]] + +[[2,[[0,6,1],2,[4],5],[8,[0,4,0,0]],10]] +[[[],[],10,6,[6,[3,6,2]]],[[10,10,[10,0],[3,6,2]],6],[[[5],5,1,[10,6,10,10,10]],9],[[2,0,[6,1,6]],[]],[[5,[3,0,0,6],0,7,[6,5,10,7]],3,[[0],6,[2,8,2,8],[7,2,5,8,0],8]]] + +[[[5,[4,2,2,1],[0],[2,3,6,6]],2],[[1,3,1,6,[2,4,3,4,6]],2,2],[4,3,1,2],[[],[9,[5],1,9]],[[],0,5]] +[[],[]] + +[[[10,4],[],0,2],[3,9],[]] +[[[],[10,[3,5,10],[2,9],6,[8,4,7,5]],[[5,8,9,2],[0],[7]],6,6],[],[3,[[5,7,8,7,1]],5],[]] + +[[[0,0,[0,4,3,9,3],7,8]],[],[[[6,3,9],5,1,[7,4],7]],[6,9],[[[3,2],8,[3,0]]]] +[[5,1,[],[4,9,[],[0,5,7,6]],6],[4,[5,0,[],7],[],[0,[1,6,6,2,2],[8,1,0]]],[7,7,8,6],[0,3,7,[],0]] + +[[],[[[0,1,10,0,2],[],[],10,[1,8,4,7]],2]] +[[[5]],[9,8,[[],0,[1,9,4,5],1,2]],[4],[4],[]] + +[[6,[[8,0,6,1]],4,6,4],[7],[3]] +[[[[3,8],[10,2],10],[],[6,1]],[[10,[9,8],[5],[6]]],[[0,4,4,9],[3],9,4],[2,5,9,[6]],[[[],[7,6,0,7],[4,6,2,1]]]] + +[[[2,[5,4,2],[8,10,9,7],[8,1,4]],[6,10,[3,1,10]],[[],[1,7,1,4,4],[8,4],[]]],[[[3,3,9,6],[0,3,9],1,[7,9,1,7]],[]]] +[[3,[[7,0,5,8],[],[7],3,[9,1,0,10]]]] + +[[[9,9,1],[7],[1,8,[9,3,10,3],[2]]]] +[[[[4,5]],1,[8,[4,5,6,9]],[6,4,[4,4],[]],[8,6,2]],[1],[]] + +[[[],1,[[9,2,5,2],2]],[[6,3,[10,9,2,9],3],[1,4,[3],3],3],[9,5]] +[[[0,3,3,0,[5,3,8,10,9]]],[[],[],3],[[[5],1,[4,6,7],[6]],6,[[2,5],6,7,7,0]]] + +[[[],1,[5,[6,5,9,8],7,2,[6,10,5]],[[],4,9]],[[10]]] +[[[7,4,[7,6,0,3]],0,9,10,6],[[],[0,[],[0],10,[0,5,4,0,7]]]] + +[[[[6]],[],[],[[],1,[2,0,9,6]],[[1,9],0]],[]] +[[],[],[[8],3],[10,2,[],[]],[[],[[]],5]] + +[[8,2],[[[7,4,2,8],10,10,6,6]],[],[[[6,7],[5,4,0,6,3]],[],9,0]] +[[[1,[]],6],[7,[[0,3,4,4,5],[8,0,6,10],0,[5],0],10,[[1],9],[]],[2]] + +[[[]],[[7,6,[5,10,5,3,7],8],[0,[0,8,10,4],[2,3],[8,1,2,9,4],9],[],0,[[2,1,10,2,0],[8,4,10,0],[0,1],3]]] +[[2,[[1,5,9,4],7],10,1,9]] + +[[4,[3,5,[8],5],[[0]],[],6],[6,[[7,2],7,[10,5,9]],5,[7]]] +[[[6],[8,[6,6]],6],[],[[6,4,5],[6,3],[1,2,[0,9],1,0],5],[[[2,3,2,0,5]],[[8,2],[2,8,10,6]],6,[[7,5,9,5,4]]],[]] + +[[10],[[],[[2],5,[2,5,3],[],[6]],1,9,9]] +[[[[4,3,5]],[[4,8],[0,7,4,10]],[[4]],4],[4,[[9,4,10,5,2],[]]],[0],[]] + +[[8,[9],3,[5]],[],[[9,[],8,4,4]],[[[10]],[[],4,[5,9,10,8]],4,[1,4,[10,5,4,3,9],[3,2],[0,0,4,4]],1],[[[4,4,6,2,6],[9,4,4],[],[9,2,2,2]],9,[]]] +[[9,[4,[3],4,[8,5,1]],[[2,6,1]]],[],[[1,3,5,6],8,10,[[1,6,0,6],[1,5,1,7,6],5,4,9],8],[[[7,8],[9,6,8,9,9],3],2,6],[6,5,[[4,3,8],6,[2,9,3,9],[]],9]] + +[[[],1],[[[0,0],[2,5,0],8,[10],10],[[7,7],[],4]],[[[10,2],[],10,9],[9,8,2],0],[]] +[[],[0,9],[[]],[]] + +[[[[10,7],7],[4,[4,4,4,0,9],[],4,[8,3,2,7]],[],[[7,7,7,9,2],[2]]],[[]],[2,2,0,7],[[[9]],4,1,1],[[1,9,[0,4],[0,7]],3,6,5]] +[[],[],[[7,1,2]]] + +[10,7,10,9,7] +[10,7,10,9] + +[[],[4,[],3,[10],[4,6,8,[10,1]]]] +[[7,[[5,5],7,[],9]],[],[]] + +[[],[[0,2,9,[3],5],7,[[4,8,0,0],5,1,1,6]]] +[[[1,3,[3,5,5,4,5],[1],[9,8,4,9]],2]] + +[[],[6,[4,9,6,[6,9,10,5],10],[5,1,2],[0,[]]],[[[0,1]],[7],9,4],[[4,[8,3,6,9]]]] +[[[[0,2,5,5],[10,7,6,9,3],5],[[0]],6,[[3,0,1,8],[10,0,8,10],[8,10,4,6,10],8,[3,9]],0]] + +[[8,[[1,6,8,4],[],[5,0],8],9],[3,6],[[5,6,6,7],5,3,9,[]],[9,5,9],[3,[8,0],[[2,9,5,7],[0,4,4],6,[9,5,10,6,6]]]] +[[[1,[]]],[2]] + +[[3,[8,[7,4,1,6],9,[4,5,9,3,4]]],[[[5],5],10]] +[[1,[],[[4,3,0,3,4],[3,9,4,0]],[1,[1,6,10],10,[10,10,7,6]],[[4,0,3,3],[2,1,3],6,[6,10,3,8,4]]]] + +[[[4,10,[5,6,4]],[[7,5,5,6,4],[],1,1],3,[5]]] +[[[1,[10,8],1,5,8],2,[[3,5,3]],8,5],[[[],[2]],0],[10,[[0,3,1,9],6,8,3,[1]],1,[5,4,[6,8,10],9]],[1,[9,3],8,5],[[[1,3,7]],[5,7]]] + +[[[3],[2],6,[[1,6,4,7,8],[4,3,4,3,4],[0]],2],[[7],6,9,0,[[1,4,3,1]]],[2,1,[9,[4],[]]],[[[5,10],[7,2,6,5],[4,4,9,7,6],[8,8,6,7,1],[]],[],3,[],[[2,3,2],7]]] +[[6,[]],[0,7,10],[[6,[0,0,4,7],[5,3,6],[0,8,3,5,8]],[[],1,[10,0,3,8]]],[7,[[],1],[9,[10,6]],[[1,3,8,0],[6,0,7,10,5],[3,9],[0,2],1]],[10,4,[1,2,0,5,[10,10,8,9,7]],[10,[9,7],[6]]]] + +[[1,[8,[3,0,7,4],4,[]]],[],[[],[[1,10,1,9,10],[10],[],10],[2,[10,6,1,1,7],6],[],5]] +[[10,3,8,[6,[8]],[[]]],[2,2,[3]]] + +[[],[[2,[7,5],[0,2],3,9],[[7,3],[5,0,7]],[0,[1,3,5,5,6],10],7],[4,5,[3],[3,10,6,[10,1]],9],[6],[[8,[7]],5,5]] +[[[[5],8,3],6,1,4],[[[3],[9]],[9,[2],[0,0,9,9,2]]]] + +[[0,[6],[7,5,0,[1,8,0,7,6],10],[4,10,[6,5],9],[5,[],[10,6,9,5],[9,1,5,10]]],[[[10,0,0,4,2],4,6],[[0,5,10,7,2],[],[4,0],6],[10],7],[[6],5,2,10],[[[1],[7],[2,0,1,2],[8,10,4,1],[2,8,8]],[1,0],3,[5,10,[6,10,6,6]]]] +[[[10,1,[],[10,9,1,8,3],[10,10]]],[2],[6,[9,[2,10,8,0],10,0]],[[1,6],[4,10,[7,4,6],[7,6,7]]]] + +[[7,10,[10,[4],[1,1],10],7,[2,[7],[8,9,3,0,8],[6,4,4,3],[6,6,5]]],[[3,1,2],10,[5,9,[3,6,6,7,5],2,[4,2,3,8,9]],[2,[1,3]],0],[[5,9,9,[8,5,8],[2,4,8,9,7]],9,[]],[[1,[],0,1,4],9,[],[8,8,[10,9,9]],[7,5,[4]]]] +[[[],[[8,4]],[[1,3,0,10],[2]]],[3,1],[[[],[8,1,8],[4,3,7],[10,0,10,2,0]]],[8]] + +[[0],[[],[[9,10,2,5,2],[],[10,4]],8,[9,6,[7],[],[7,0,1,1,9]]],[[1,8,7]],[10,[4,[0,7,7,7,2],4,[9]],[[4,0,7,1],0,[4,0],3,10],[]]] +[[3,1,[[8,1,0,3]]],[[0,1]],[[[4],2]]] + +[[2,[[3],0]],[],[[],[],4,6,7],[[],2,[1,5],3]] +[[[[4,2,8],1],[[9,9,3,7],[2,6,5,6],4,1,[10,7,7,6]],5],[]] + +[[[5,[6,8,8,1]],6,9,[0],5],[[[6,5,6],[5,1,9]],0,[5],[[3,4,6,8],9,[7],5,[8,1]],7],[[1],[],[]],[5,[[5,5,4,3,6],8,0,[1,7,8],[1,6]],[],[[4,7,2,7],[7,0,4,9,9]],[2,[8,3,4]]],[[[5,8,1,9],[0,7],3],[0],8,[[8],4,4,[10,6,2],[8,5,5,7,3]],3]] +[[[4,[0,8,10],[7,10,2,8],[],0],7,[[3,2,3],[9,6,0],8,[],10]],[[6,[3],[]],[1,[1,9,9],[4,5,9,1],[]],[2,6],[[8],[6],3,[6],[10,3]],[0,[0,4,3,3],[1,3],10]],[7,9]] + +[[[9,[6],3,[],[0]]],[[[7,6,9,8],7],[1]],[[[8],6,[0,1,7],0],[9,10,4],[[6,3,3,1,6]],8,8],[5,[[4,2,9,3]]]] +[[],[2,3,4],[8,[7,[],3],[[2,10,5,10]]]] + +[[],[[[],5,[0,3,0,4,5]]],[[7],[],[6,[],[1,10,7,4]]]] +[[[[],[4,7,3,0],[10,4,1],0],9,[7,[10,4,7,4],4]],[10,[[0,3,9,8],[10,4,8],6,[7,6,8,3,5]],[1,10],[[]]]] + +[[6,[1,[7,10,4]]],[[[9,4,0],3],[],9,6],[10,[[0,9,1]]],[9],[]] +[[[[8],[5],[8,9],[8],10]],[[8,0,1,5],7],[5,4,[8,[1,1,7]]]] + +[[],[3,8,0],[[[3,1,10,1,9],8],2,[],10,10],[2,[1,2],2]] +[[1,[]],[[4,2],9,[5,8,7,9],[2]],[10,[],6,[10,[]]],[[[9,10,0],2,6,2],7],[[10,1,[1,2]],[3],2,[6]]] + +[[[],[],6,10,[8,6,[7,0,7],[0,1,0,8],[6,6]]]] +[[1,0,2,[7,2]],[[1,[10,6,1],0,2],[10,[9,9,8,6],10,[6,2,8,1]]],[[[1,0,3,1],4,2,3],[[8,7],1],1,[[],[3,4,5],[]],[[6,5,3,10],[8]]],[2],[0,3]] + +[[6,[[],1,8]],[4]] +[[1],[],[4,[[5,10,2,3,4],[3,2,10,0,2],[]],[[],[]],[]],[[],[[0,6,9,6,5]],[]]] + +[[0],[[[3,1,6],4,7,0,8],[6,[9,9,10],[1,1]],[9],6],[]] +[[[],[]],[2,0],[4,8,2],[[[0,3,6]]]] + +[[[[1],[9],2,[5,10,8,3],4],9],[[],[[1,6,8,9],2,[5,5,7],[0],8],[[1,6],[10]],[7,[]]],[],[5],[2,[],[2,[10,3,2,8],[3,8],[]]]] +[[[8,7,[7],[9]],5,5,0],[[[5,0],[],1,10],[0,[10,6,8,2],[8,6,5,8],3],6],[[[],[4,6,8],[9,3,2,2]]],[],[8,[],[10,7,8],9]] + +[[2,4,6,[[8,4],[3,7,10,10,9]],[[],9,[],[2,8,10,1,5],6]],[[[10,8,10,10,7],8,6,[7,4,3,9]],[]],[1,[2,[9,3,7,9,8]],7],[0,0,[[1],[10,10]]]] +[[[[1,2],[0],[0,1,5,6,3]],[[7,1,8],[4],6,[4,10,1,7],[7,1,6,3]]]] + +[[[[6,9,1,10],[10,10,4,7]],9,9,[3],7],[]] +[[[10,[8],10,1],[[8,2,6,8],[6,3,2],0,3]],[[[5,10],[9],6],[[5,5,3],[],[10,0,4],2],[[],10,4,8],[],6],[10,[],0,[[],[2]],[7,8,2,[5,0,10]]],[5,[4,[6,0],[0,2,8,3],4,[4,9,4]],2,[[6,2],[3,2,0,3],[],8,10]]] + +[[],[8],[8,3],[]] +[[],[2,[4,3,6]],[8]] + +[[5,[7,0,[6],9],4],[[[1,7,2],[4,4,1,10,9],[8,2,0,7],9]],[[[6,3,1,3],[7,7,4,7],[],[1],10],8],[[],[1,6],6]] +[[],[10,3,7,3,[1]],[[3,9,[9,7,5,7]],3,[0,[0],4],4,[8]],[0]] + +[[8,[],5],[[[4,6,0,3,7],2],10]] +[[[[8,4],8,[1,8,0,4,7]],[[1,8,3,7,8]],[0,4,[7,9,8,5,5]]],[[7],[3,[0,6],1,7,[9,6,1]]],[6,2],[0,9,[[7,8,2,4],4,3,8,5],6]] + +[[10,[3,[4,0,8,3],[2],[5,6]]],[6,[4,[6,3],5,[8,10,7]],[[],[5]]]] +[[[[],[3]],0,[],5]] + +[[],[5,10]] +[[8,[[1,9,3,8],2],[[5,3,3,4,4],[3,4,9],[8,3,6,2,6],4],0,5],[1,1,[[8,2,5]]],[2,[[5,8,0,1],8,10,[1,5,5,2]],[[],[]],[]]] + +[[[8,[1,2,9,8],4]],[[[9,3,1,7,7],5,[6,7,5]],6,[[1,0,10,5,2]]],[2,[5,9,5]]] +[[10],[5],[2]] + +[[8,[2,[1,3],8],[4]],[6,[[1,8,1,10,8],2,[9,7],[]],9,7],[3,[4]]] +[[[[9],[5,4,10,3],[3,4,7,2],[7]],4,4,8,4],[9,4,[[2,7,5,3]],[2,1,5],2],[],[[5,9]]] + +[[[],10],[3,[[4,6,10],[7,9],10,5,0],[0,7,[],0,[1,2,6]],[0],1]] +[[[[7,8,6,9,3],3,[1]]]] + +[[[[2,0,2,2],[7,5,3,0],[5,7,1,9]],6,9],[10,1,[[6,7,0,5,9],2,3],[]],[[[10,10,8,8],[],[],[2,4],[6,6,3,3]]],[8,[[4,2,3,7],5,0],[10,2],[[7],[10,8,0],0],0]] +[[[[2,10],2,[0,7,1],6],4,[[6],6,[2,9,2]]],[[[1,4,8],9,[1,0,6],[8,9,0,10,2],7],8,[[7,4,4],[10,1,6,1],5,10],5],[[],6,[[7,1],4],5],[[[2,1,4,9],[5],[8,8],[0,3,9,0,3],[9,0]],4,[1,[9,10,1],[],[3,1,3],[6,8,3,9]],6,1],[[[1],[6,5,10]],[3,0,[3,2,10],2]]] + +[[[[0,8,1,10,10]]],[10,[]],[[7,[3,9,5],[2,7,0],0]],[],[]] +[[],[0,9,3,7],[],[2,8]] + +[[10,2,6],[[[9,7,10,6,2],7,[3,7,2]],3,3,[0,[1,1,0,9]],0],[8,5],[[6,[],4,6]]] +[[[8,[],2,[],[6,4,8,1]],[6,7,4,[0,6],7],[],6,[9]]] + +[[[[0],[10],10]],[2,[[5],0,[7,3],6],[[4,9],7,4,[]],[[3,2,4,0],[],[],[3,4,7,7,1],[7,9]]],[],[[]],[[[],10,[],9],7,1]] +[[[[3,4]],1,2,[3,[9],1,5,[3]]],[[4,[10,6,4]],10,[[7,0,3,10],9,2,[8,10,3],10],[7,3,[7,3,4],0,10],[[],[0,3],2]],[],[2,[[7,3,4],[],3,[6,1,0],2]],[[],9,[[4,8],[3,10,0]],2]] + +[[6,2,8,[[],7]],[],[[1],[[3,6],9,[],[6,7,8,1]],8,[[2],[0,9],9,5]],[]] +[[[[7,7],[]],[],6],[[10,0,3,[9,6,2,4,8],[]],10,3,[[1],[7,5,8],0,[9,10,2],[0]]],[8,[[9]],1],[5,[4,2,5],9]] + +[[[6,[4,5,9],7,2],6],[4,2,[[9],[],[],[0,9]],2,[[0,5,4,0],6]],[],[9,3,[1],7,[2,[],4,0,3]]] +[[8,1,[6]],[[7,7,3,[1]],1,[2,8,10,8,3],5],[[[1,9,9],2],[[7,8,6,9,5],[7,6,1],[2]],5],[3,[5,3,[10]]]] + +[[],[3,[[],6,[3,8,1],2,5],3,[[0,0,5],10,[]]],[]] +[[],[[],3],[[],[]],[[[7,8,9,1],2],[[0,1,10,3,8],7]],[[[0],[],[],[4,10,3,6]],[],10,[1,[],10,[9,5,3]]]] + +[[],[3,[[],[0,8,1]]],[[[9,5,5],9,[10],[4],[9,1]]]] +[[6,[[5,5,3,0],[2,7,5,5,4]]],[[8,[0,7,5,6],[7]]]] + +[[[5],7,[3,9,[8,0,10]]],[],[7,5],[5]] +[[[],[],4],[0,10,[[4,4,5,6,5]],3,3]] + +[[3]] +[[1,[2,8,2,4],[8,[],[8,3,9]]],[[0,[0,10,3,4,4],7,6,[]],[],9],[[7,9],[[]],1,10]] + +[[[[7],0],10,5,2,4],[[10,[],2],[[5,2],0,[10,6,5]],1,9]] +[[5,7,[[10,8,2,10,8],[8,6],8,[5,1,4,5]],[],[10,[1,9]]],[[2,[5,3,2,10,6],[5,2,0,3],[6,10]],[[5,5,1,5],5,[9,3,10,6]]],[[0],7,3,[[],[],8,1,3],[10,[2,8],4,4,2]],[6],[4,3,4,[8],5]] + +[[[[2,6]],0,0]] +[[[0],9,1,7]] + +[[8,2,10,3,2],[7,2],[[[4,9,8,3],[],[10,3],1],5,[5,[3],[4,9,4],[2,6,6,2],[5,4,10,3]]]] +[[0,6,[3,[]]]] + +[[[[7,10],7],8,[],10,8],[3],[],[9,4],[[[10,5],[7,2],[6,3,8,5,8]],8,6,3]] +[[4,0,[[10],[7],[],10,3]],[],[[[6,7],5,9,[3,3,4]],3,[],[4,10,6,2],4],[[2],[[7],[3],[3,2,10,9]],[2,6]]] + +[[[[9,0,2,9,6],[9],[10,3],6,[1,10,5]],[[4],5,[4,9,6,7,4]]],[[]],[1,5,[]],[5,7,9,[[],[],7],[[8,7],[0,8,4],[6,6,4,7]]],[[4,[],1],2]] +[[3,[[8,7,3,4,7],[7],[9,6,0,2]],[4,8,[0,0,5,5],[]]],[],[7,[[0,10,2,9,2],[10],[0,1,7,9,4],10,[6,7,8,4,8]]],[]] + +[[],[3]] +[[],[],[[[1],[8,8,10,9],[1,7,6]],7,[[7,5,8]],[[8,5,7,0],5,[6]]]] + +[[5,8],[7,5,9,10,[[8,7],8,[],4,[2]]]] +[[],[[10,8,6,[6,9],[7,7]],[9,[5,5],2],5,[[10]]],[]] + +[[[[],[1,2]],[[],[9,5,5],7,8],0,3],[4,[3,1],0]] +[[10,[[8,3,9],10]]] + +[[[[4,10,3,8],7,9],[],[2,1,[5,0],[4,10],3],5],[8,[[3],2,9,6],6],[],[[],[6,3,[9,10,5,8,10],5,[10,4]]]] +[[[[],7,3]],[],[[10,[10,4],10],3]] + +[[[[7,6],[5,6,0,5,2],[7],1,8],6,[[10]]],[],[1,7,6,1,5],[0,[[0,5],3,[1,4],[],7],[[9,0,3]],[[9]],[[1]]]] +[[4,[],[],[5]],[[[],[1,3,0],[10,3,5,2],2,[4,2,0,8,9]],[0,[4],[],[2,3,3]],9],[3,[1],10,5],[[],[7,5,[10,9,7],3,[]],10,[8,[]]]] + +[[8],[[8,[4,3],0,[2,4,10]],4,8,8],[[[2,1],9,[],[7,3,5,3,8]],6,9,10]] +[[[[0,4,0,6]],5,[10],[[4,4,9,9],[1],[2,4,0,0]]]] + +[7,7,7,8] +[7,7,7,8,9] + +[[[[7],[2,5],[4,1,10,9]],[[],[6,0,2,1],[0],[7,0],9],8,[6],9],[4,[],[]],[2]] +[[7],[[6,6]]] + +[[10,0],[6,2,10],[[[9],7,[6,7,9,1],9,[5]],[6,3,4],[],[[7,1,4,3,9],7,[5,3]],4]] +[[8,[],6,[7,[],[9],[8,9,5,0]]]] + +[[0,[5,[4,1,0,4,8],[7,5,0,4]]],[8,2],[]] +[[[[7,4,0,6],2],[[1,0,5],5,6],[6,9,7,7,1],8],[9,[[7,3,0,10],[3,10,1,7,0],[7,9],[],[4,2]]],[2,6]] + +[[1,5,0],[1,[]]] +[[],[[2]]] + +[[1,2],[0,[[5,9,5,0,0],10,3],7,[[10,5,5],[10,6,9,3,10],0]],[[[9,1,10],5,[0,7,5,2,10],[0,1,2,5],[2,2,6,2,9]],6,[[6,10,1,1,5],[6],4,6],1,7]] +[[[[4,4,7]],2,[[],[0,8,3],1,7,[]],2,[2,8,[],[1],5]]] + +[[[],4,[7,[8,0,6,0],[1,2,6,5],[8,10,8,3,3]]],[],[[0,6,3,8,[]],9,9,1]] +[[[],[[9,2,1],4,[]],[6,[4,10,4,3,8],[10,1,4]]],[[[1,5,7,2,0],3,[3,5,5,1],[]],3,[],2]] + +[[0,1]] +[[],[[]],[9]] + +[[[8,[],[4,5,10,6]],[],[[7],[10],10]],[9,3,[[4,1,0,9],[0,9,8]],[6,0,8],10],[],[]] +[[[[9,9,0,5],1,4,6,[4,9,6,10]]]] + +[[[1],[3,10,[3,6]],[5]],[[[],[10],[7,9,5],[],0],4,[[],10,[],2],10,[[7,1,9],7,[0,6,8],[10,4,6,9],[0]]]] +[[[],[[],[10,9,8],[3,6,1,0],[0]],[8],[[],[8,8,7]]],[[]],[]] + +[[0],[[[],10,6,9,[7,8]],2,[]],[[[8,3],[6,4],[],[5,9,5,5],[2,10]],[7,4,[],8,[9,5,10]],5,[5,[6]],[]],[3,6,[[10,0,0,10],9],2,1]] +[[0,[9,[1,0],[0,3,4,10],4,[8,1,1,8]]],[[[9,1],[0,5],[2,3,0,7]],[8,[10,9,9,4]],[[]]]] + +[[[[10],4],0,9,7,7]] +[[],[[10,2,[2,2,2],5],1],[[[3],[7,3,9],9],1]] + +[[3,2,[[7]],2],[6,1,7,[5,[6],2,9]],[[0,[6]],[[0,4,1,7,0],[8,4,9,7,8],[],8,[3]],1],[],[]] +[[1]] + +[[],[[[8,5,0,6],3],[[],[3,10],[7,1,1,9,6]]],[],[[[5,9],[2,7],[4],10,6],[7,[0,7,10,9,1],[3,0,9,2,10],8,[6,4]]],[[6,[],[0,3,8,0],2,9]]] +[[[[7]],0,2,10,[[10,2,9]]],[1,[[],10,[8],0,[5,3,8,9,1]],[10,8,[0,9,3],1],2,[4,9]],[],[3,[[9,3,5,4],[],3,[2],[4,6]]]] + +[[7,5],[],[8,[[7,9,0,2,9],10,[0,8],[1,6]],5,2],[4,10,8,3],[6,8,[[8,5,7,5,1],[],[5,8]]]] +[[],[[],[],[4,[8,9,5,8,1]],5],[[[6,4,10],[7,4,7,0]],10,1,[[0,8],5],[10,[1,1,8],2,[4,4,1],6]],[]] + +[[[[2,4],[9,4,8],10,5],2],[2,[[4,6,7,1],6,4,[10,8,4,2],10]],[],[[[5,0]],[[],0,[1,8,8,9,3]],9,[[10,9,2,6]]]] +[[3,2]] + +[[[0,[10,1]],[[],[4,8,8,8,9]],7,[2,0,[2,6]]],[],[3,9,3],[[4],2,[[1,3,9,5,10],[6,0,5],0],[6],[2,0,[]]]] +[[0,9]] + +[[10,9,[[0,10],[]],10,2],[3,2,[7,[7,4,7]],[9,[1,10],1,[7,8],[7,7,3,9,2]],8],[[[9,6,1],7,2],10],[],[[2,6,[5,0,3,7],[8,4],1],[5],[3,[8,8,1,6,1]]]] +[[8,[1,[10]],10,[10,[],1,3],[6,3,1]],[[],5,[0,3,[9],[0,4],[3,5,10,2]]],[4],[[[1],4,[6,7],0],[[],2,[9,8,0,5]]],[[[0,4],1,[6,0,6,8],[3,1,0,6],7],[10,[7,6,1,0,10],4,[9,7,1,7,0],[]],8,1,5]] + +[[[[],[],[10,1],[1],[3]],[[5,5,4,3],6]],[2],[[[10,9,2,6],[4,2],1,[5,10,8,3]]],[]] +[[[[5]],[6,[5,8]],[[2,10,6,10,2],2]],[[[5,2],4],[7,[9,10,6,8],[],10],[[4,6,4,9,1],[1,8],5,6,[7,8,0,4,7]],[],[4,7,[6,10],[4,10],[9,0,2,6,2]]]] + +[[],[7,[[9,10,9],0,[]]],[2,[[3,0,10,7],8,4,5],1,10,[]],[[4,1,7],[[],[],[5],[9]],[0,5,[5,1],4,[]],[[],10,1,10]],[5,[4]]] +[[[5,0],[2,0,[],[10,6,3,0,2],[1,2,7,9]],10,0],[[[5,4],6,3],5,3,[[6,10,8,7,8],[7,6,0,3]]]] + +[[10,[6,[],[3],4,[7,4,0]],[[],[2,1,1]],5,5],[8,2,8,4],[[1,2,[3,3]],[[],[10,2,8]]],[2,[],2,[5,[]],7]] +[[[[7]],2,1,[1,1,[7]]],[[7,[],[3,3,10]],[6,3,[2,0,10],[3,1,10],5],3,10],[6,9],[[[9,5],[1,8,8,7,2],10],[9,[5,3,9],[9,2,4,6]],[7,[6,9,9,0],7],10,[10,[],6]]] + +[[]] +[[],[[10,[],[10,8,1],[0]]],[1],[[]],[[[4],[7,2]]]] + +[[[]],[7,[[10,4]],[],[8]],[[6],[[4,7],9],[7,1,7,[7,1]],8,5]] +[[5,9],[[],6,10,1,3],[3,[8,2,[],[],[0]],7,5,5]] + +[[[7,10,0,[3],[]],[]],[[[3,9],[]],[[2,3,7,4]],3,[8,1,[6,6,9],[6,7,6,9,5]]],[[[5,3],9,[],3,9],[9,7],[[],[1],[],8,10],9]] +[[6],[[[8,8,10,4,5],4,[2,5,7,2],0,[1,6]],0,[[0],3,[3,10,7,4,7],8,[5,3,2,3]],8]] + +[[0,[],10],[[[4,10,3,10,8],6,9,[9,8,1,4],[0]]],[[[0],[]],9,[[2,10],6]],[]] +[[10,1,[[4,8,2,10]],10],[[],[],10,[]],[[[0],[5,1],1]]] + +[[],[7,[[],[3,3,1],7,[2,4,10],[]],5,6],[2],[2,1],[]] +[[[],10,7,5,6],[],[[[7,1,10],6,2,[4],4],4,[[0,4,2]]]] + +[[4,[8,6],2,4],[[[9],[10,8],10]],[[[8],5,[9,7,3,1,1]],[3,9],[10,3,[],10,5]],[8]] +[] + +[[[[1],[9,6],[8,0,7,9,1],[2,2,0,7]],[[7,5,0,9],8,7,[]]],[],[[[4,6,8,5,6],[],[]],[4,[8,5,6,3],5],[7,[],2,0],9],[2,9,[[0],[1],[5],[8]],8]] +[[9,[[],2],1],[],[2,8,[10,8,0],6,3]] + +[[[[1,6,3,10]],4,0,4],[],[0,[],5],[],[[[2,10,8],[4,2,4,10,2],1],4,[[4,2,1,0]]]] +[[[],[],[[0,5,1],5,[0,4,1,3],[9,7,1]],3,10],[[[0]]],[1]] + +[[5],[[3,10,[7,10,0],5],4],[2,[[8,10,0]],[[9,0,4],6],[]],[6,10,2,0,2]] +[[[0,9,[7,10,9],[6],6],8,[1,[],[],[9,5,5],4],[6,[9,6,6,7]]]] + +[[1,8,4,2],[10,8,[9,[8,4,1,1,8],10]],[],[2,9,[5,[1,5,3],[9,3,5],8,[]],8]] +[[6,5],[[[4,6,10,5,9],10,[10,7],5],[[8],[3,0,7,8],[10,8,5,7],[7,6,4],4],[5,10,[],6]],[7],[]] + +[[[[4,10,8,5],[0],8,[0],9]]] +[[8,0,[[5,0,6,3,10]],7],[9],[[],3,0,10]] + +[[],[6]] +[[8,1]] + +[[],[9,4]] +[[],[[5,4,1],7],[[],4],[],[3,1,[[1],3,4,2]]] + +[[[[8],[6,0],0,1],4,[3,[6],1],1,1],[[[2],[3],[]],[[1,6,6,8],8,[8,6,7],[1],10],4,1,7],[[2,[4],[8],10,[10,2,7,1,9]],3,6,[4,3,[1,10,8]],[]],[[1,[9,9]],10],[8,2,[4,[8,10,5,5,2],0,[8,7,0,9]]]] +[[[[9,8],[2,9,8,6,6]],[],[6,[0],[8,10]],5,2]] + +[[[1,5,[3,1],1]],[],[[9],1],[[[5,10],[]],[0,9,0]]] +[[[9,[8,6,7,0,8],9,[4,5,3],[10,0,5]],10,[]],[]] diff --git a/src/Year_2022/files/P14.txt b/src/Year_2022/files/P14.txt new file mode 100644 index 0000000..c5d837b --- /dev/null +++ b/src/Year_2022/files/P14.txt @@ -0,0 +1,134 @@ +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +494,16 -> 499,16 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +492,52 -> 496,52 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +510,123 -> 515,123 +492,48 -> 496,48 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +501,54 -> 505,54 +513,120 -> 518,120 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +483,54 -> 487,54 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +532,129 -> 537,129 +501,16 -> 506,16 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +520,120 -> 525,120 +489,50 -> 493,50 +498,19 -> 503,19 +505,151 -> 505,152 -> 518,152 -> 518,151 +510,73 -> 514,73 +516,77 -> 520,77 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +511,129 -> 516,129 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +524,123 -> 529,123 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +507,75 -> 511,75 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +514,149 -> 524,149 -> 524,148 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +504,129 -> 509,129 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +504,77 -> 508,77 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +516,117 -> 521,117 +514,149 -> 524,149 -> 524,148 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +507,126 -> 512,126 +513,75 -> 517,75 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +505,151 -> 505,152 -> 518,152 -> 518,151 +510,77 -> 514,77 +528,126 -> 533,126 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +518,129 -> 523,129 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +491,19 -> 496,19 +505,19 -> 510,19 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +506,135 -> 517,135 -> 517,134 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +506,135 -> 517,135 -> 517,134 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +497,13 -> 502,13 +489,54 -> 493,54 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +505,69 -> 505,70 -> 511,70 -> 511,69 +487,45 -> 487,38 -> 487,45 -> 489,45 -> 489,42 -> 489,45 -> 491,45 -> 491,39 -> 491,45 -> 493,45 -> 493,39 -> 493,45 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +525,129 -> 530,129 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +505,151 -> 505,152 -> 518,152 -> 518,151 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +521,126 -> 526,126 +512,106 -> 512,108 -> 505,108 -> 505,114 -> 518,114 -> 518,108 -> 516,108 -> 516,106 +495,50 -> 499,50 +495,54 -> 499,54 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +508,103 -> 508,93 -> 508,103 -> 510,103 -> 510,101 -> 510,103 -> 512,103 -> 512,96 -> 512,103 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +498,52 -> 502,52 +517,123 -> 522,123 +514,126 -> 519,126 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +495,22 -> 495,25 -> 492,25 -> 492,32 -> 501,32 -> 501,25 -> 499,25 -> 499,22 +505,69 -> 505,70 -> 511,70 -> 511,69 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +512,90 -> 512,87 -> 512,90 -> 514,90 -> 514,86 -> 514,90 -> 516,90 -> 516,87 -> 516,90 -> 518,90 -> 518,82 -> 518,90 -> 520,90 -> 520,81 -> 520,90 -> 522,90 -> 522,86 -> 522,90 -> 524,90 -> 524,84 -> 524,90 -> 526,90 -> 526,82 -> 526,90 -> 528,90 -> 528,82 -> 528,90 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +520,165 -> 520,160 -> 520,165 -> 522,165 -> 522,163 -> 522,165 -> 524,165 -> 524,159 -> 524,165 -> 526,165 -> 526,159 -> 526,165 -> 528,165 -> 528,155 -> 528,165 +505,69 -> 505,70 -> 511,70 -> 511,69 +505,57 -> 505,59 -> 498,59 -> 498,66 -> 509,66 -> 509,59 -> 507,59 -> 507,57 +502,138 -> 502,141 -> 498,141 -> 498,145 -> 514,145 -> 514,141 -> 507,141 -> 507,138 +486,52 -> 490,52 diff --git a/src/Year_2022/files/P15.txt b/src/Year_2022/files/P15.txt new file mode 100644 index 0000000..e41a21c --- /dev/null +++ b/src/Year_2022/files/P15.txt @@ -0,0 +1,35 @@ +Sensor at x=545406, y=2945484: closest beacon is at x=772918, y=2626448 +Sensor at x=80179, y=3385522: closest beacon is at x=772918, y=2626448 +Sensor at x=2381966, y=3154542: closest beacon is at x=2475123, y=3089709 +Sensor at x=2607868, y=1728571: closest beacon is at x=2715626, y=2000000 +Sensor at x=746476, y=2796469: closest beacon is at x=772918, y=2626448 +Sensor at x=911114, y=2487289: closest beacon is at x=772918, y=2626448 +Sensor at x=2806673, y=3051666: closest beacon is at x=2475123, y=3089709 +Sensor at x=1335361, y=3887240: closest beacon is at x=2505629, y=4282497 +Sensor at x=2432913, y=3069935: closest beacon is at x=2475123, y=3089709 +Sensor at x=1333433, y=35725: closest beacon is at x=1929144, y=529341 +Sensor at x=2289207, y=1556729: closest beacon is at x=2715626, y=2000000 +Sensor at x=2455525, y=3113066: closest beacon is at x=2475123, y=3089709 +Sensor at x=3546858, y=3085529: closest beacon is at x=3629407, y=2984857 +Sensor at x=3542939, y=2742086: closest beacon is at x=3629407, y=2984857 +Sensor at x=2010918, y=2389107: closest beacon is at x=2715626, y=2000000 +Sensor at x=3734968, y=3024964: closest beacon is at x=3629407, y=2984857 +Sensor at x=2219206, y=337159: closest beacon is at x=1929144, y=529341 +Sensor at x=1969253, y=890542: closest beacon is at x=1929144, y=529341 +Sensor at x=3522991, y=3257032: closest beacon is at x=3629407, y=2984857 +Sensor at x=2303155, y=3239124: closest beacon is at x=2475123, y=3089709 +Sensor at x=2574308, y=111701: closest beacon is at x=1929144, y=529341 +Sensor at x=14826, y=2490395: closest beacon is at x=772918, y=2626448 +Sensor at x=3050752, y=2366125: closest beacon is at x=2715626, y=2000000 +Sensor at x=3171811, y=2935106: closest beacon is at x=3629407, y=2984857 +Sensor at x=3909938, y=1033557: closest beacon is at x=3493189, y=-546524 +Sensor at x=1955751, y=452168: closest beacon is at x=1929144, y=529341 +Sensor at x=2159272, y=614653: closest beacon is at x=1929144, y=529341 +Sensor at x=3700981, y=2930103: closest beacon is at x=3629407, y=2984857 +Sensor at x=3236266, y=3676457: closest beacon is at x=3373823, y=4223689 +Sensor at x=3980003, y=3819278: closest beacon is at x=3373823, y=4223689 +Sensor at x=1914391, y=723058: closest beacon is at x=1929144, y=529341 +Sensor at x=474503, y=1200604: closest beacon is at x=-802154, y=776650 +Sensor at x=2650714, y=3674470: closest beacon is at x=2505629, y=4282497 +Sensor at x=1696740, y=586715: closest beacon is at x=1929144, y=529341 +Sensor at x=3818789, y=2961752: closest beacon is at x=3629407, y=2984857 diff --git a/src/Year_2022/files/P2.txt b/src/Year_2022/files/P2.txt new file mode 100644 index 0000000..895876a --- /dev/null +++ b/src/Year_2022/files/P2.txt @@ -0,0 +1,2500 @@ +C X +A Y +C Z +B Y +C Z +A Z +B Y +C Z +C Z +B X +A X +A Z +C Z +C X +A Z +A Z +C Z +A X +A Z +A Z +A Z +A Z +A Z +C Z +A Z +C X +C Z +A Z +A Z +B Y +C Z +B X +B X +A Z +C Z +A X +A X +B Y +B Z +B Y +A Z +C Z +C X +C Z +C Z +C Z +C Z +A Z +A Z +A Y +A Y +C Z +A X +C Y +A Z +B Y +C Z +C Z +B Y +C Z +C Z +C Z +A Z +A Z +B Y +C Z +A Z +C Z +C Z +A Z +B X +C Z +A X +A X +A Y +C X +A Y +B X +A Z +A Z +C Z +A Z +A Y +C X +A X +B Y +A Z +A Y +C Z +C Y +A X +B Z +B Y +A Y +C Z +C Z +C Z +B Y +A Z +C Z +A Y +C Z +A X +C Z +C Z +A Z +A X +C X +C X +A X +A X +A Y +A Z +C Z +A X +A Z +B Y +A Y +A Z +C Z +B Y +A Z +C Z +A Z +A X +A Z +B Y +C Z +C Z +C Z +C X +A X +C Z +A X +B Y +C X +C Z +B Y +B Y +B X +C Z +B Y +C Z +C Z +C Z +A Z +C Z +C Z +B Y +C Z +B Z +C Z +C Z +A X +C Z +C Z +A Z +C Z +C X +C Z +A Z +A Z +A X +B X +C Y +A X +A Y +C Y +C Z +A Z +A X +C X +C Z +A X +B Y +C Z +A X +A X +C Z +B Y +C Z +A Y +A Z +B Y +A Y +A X +C X +A Z +C Z +B Y +C Z +C Z +C Z +C Z +A Z +C Y +C Z +A Y +A X +A Z +A Z +A Z +C Z +C Z +A Z +C Z +A Z +C Z +A Z +C Z +A X +B Y +C Z +C Z +C X +B X +A Z +C Z +A Y +C Z +B Y +A Z +C Y +C Z +C Y +C Z +B Y +A Y +A Z +C Z +C X +C Z +A Z +A Z +A Z +A Z +A Z +C Z +C X +A X +C Z +A X +A Z +A Z +A Z +A Z +A Z +B Y +C Z +C Z +A Z +C Z +C Z +C Z +A Z +C Z +C Z +B Y +C Z +A Z +A Y +C Y +B Y +A Z +A X +A Y +C X +B Y +C Z +C X +C Z +A Z +B Y +C Z +C X +C Z +A Y +B Z +C Z +C Z +C Z +A X +B Y +C Z +C X +B Y +B Y +C X +A Z +B Y +C Z +A X +B Y +C Z +C Z +A Z +B Y +B Y +B Y +A X +C Z +B Y +B Y +B Y +A X +A Z +C Z +C Z +B Y +A Z +B Y +B X +A Z +C X +A Z +C Z +A Z +C Y +A X +B Y +C Z +B Y +C Y +C X +A Y +C Z +A Y +C X +A Z +A Z +A Z +A Z +C Z +A Y +B Y +C Z +C Z +B Y +C Z +C Z +C Z +C Z +C Z +C Z +A X +C Z +C Z +C Z +A X +A Z +A X +A Z +A X +A X +C Z +A Z +B Y +C Z +A Z +C Y +A Z +B Y +B Y +C Z +B Y +B Y +A Y +B Y +A X +C Z +A Y +C Z +A Z +A Z +A X +A Z +A X +C Z +B Y +A Z +A X +C Z +C Z +C Z +A Z +A Z +C X +A Z +A Y +A X +C Z +A Y +C Z +B X +C X +A X +A X +C Z +A Y +C X +A Z +B X +A Z +A Z +A Z +A X +A Y +A Z +C Z +A X +C Z +A X +A Z +A Z +B Y +A Z +C X +C X +C Z +A Z +C X +A Z +A Y +C Z +C Z +B Y +C Z +C Z +A Z +A Y +B X +C X +C Z +A Z +C Z +A X +A Z +A Z +B Y +A Y +A Z +A Z +A Z +C Y +B Y +A Y +C Z +C Z +C X +B Y +C Z +C Z +A Y +A X +C Z +C Z +C X +A Z +B X +C Z +B Y +A Y +C Z +C Z +B X +A X +A X +C Z +A X +A X +C Z +A Z +C Z +A Z +A Z +C Z +A Y +C Z +C Z +C Z +A Z +C Z +C Z +A Y +C Z +C Z +C Z +C Z +C Z +A Z +C Z +B Y +A Z +C Z +C X +A X +C Z +B Y +A Z +A X +B Y +C Z +C Z +C Z +A X +C Z +A Z +A Y +A Y +A Z +A Z +A Y +B Y +A Z +C Z +B Y +C Z +A Z +C Z +B Y +B Z +A X +C Z +A Y +A Y +A Z +A X +C Z +C Z +C Z +C Z +C Z +A Z +C Z +A Z +A Y +A Z +C X +A Z +C Y +B Z +C X +A Z +A X +A X +B Y +C X +C Z +B Y +A Z +C Z +C Z +A Z +C Z +A Z +C X +C Y +C Z +A X +C Y +C Z +A Z +A Z +C Z +C Z +A Y +C Z +C Z +B Z +C X +A X +A Z +C Z +A Y +C Z +C Z +A X +A Z +A X +A Y +A Y +A Y +C Z +B Y +C Z +A X +C Y +C Z +B Y +A X +C Z +A Z +A Z +B Y +C Y +A Y +C Y +A Z +C Z +A Z +C Z +C Z +A Z +A Z +C Z +A Z +C Z +A Y +C Z +C X +C Z +C Z +C Z +C Z +A X +B Z +B X +B Y +B Y +C Z +A X +A X +B Y +A Z +A X +C Z +A X +C X +A Y +A X +C Z +C Z +C Z +C Z +C Z +A X +C Z +B Y +C X +A X +A Z +A Z +C Z +C Z +A Z +A Z +C Z +A X +A Z +B Y +C X +A X +A Y +A Z +C Z +A Z +A Z +B Y +A X +B Y +C X +A Y +B Y +A Z +C Z +B Y +A Z +C Z +C Z +A Z +C Z +A Z +C Z +B Y +A Z +A Y +C Z +B Y +A Z +C Z +C Z +A Z +A X +A Z +A Z +C Y +A Y +C Z +C Y +C Z +C Z +B Y +C Z +C Y +A Z +C Z +B Z +C Y +B Y +C Y +C Z +A Y +C Z +A Z +C Z +A Y +C Z +C Z +B Y +B Y +A Z +C Z +B Z +C X +B Y +B Y +C X +B Y +A X +A X +A Y +A Z +A X +A X +C Z +C Z +C Z +C X +C Z +B Y +B Z +C Z +A Z +A Y +A X +B Y +B X +A X +A Z +C Z +C Z +A Z +C Z +A X +B X +B Z +C Z +B Y +A Z +A Z +C X +A X +A Y +C Z +B Y +C Z +A Z +A Z +A Y +C Z +A Z +A Z +A Z +C Z +C Z +C Z +A X +A X +B X +C Z +A Y +A Y +A Y +C Z +A Z +A X +C Z +A Z +A Z +A X +C Z +C Z +C X +A Z +C Z +C Z +C Z +A Z +C Z +A Z +C X +A Z +C Z +C Z +A Y +A Y +C Z +C Z +C X +A Z +A Y +C Z +B Y +C Z +A Z +C Z +C X +A Z +A X +B Y +B Y +C Z +A Z +A Z +A Z +B Z +B Y +C Z +A Z +C Z +C Z +A Z +A Z +A Z +A X +B Y +C Z +A X +A Y +A Z +C Z +A Z +C Z +C Z +C X +A Y +C Z +C Z +C Z +C Z +B Y +C Z +C Z +B Z +C Z +A X +C Z +C Z +C Z +A Z +C Z +C X +A Y +C Z +A Z +A Y +A X +B X +B Y +A Z +A Z +A X +A Z +C Z +A Z +A Z +A Z +A Z +C Z +A X +A Z +A Z +A Y +C Z +B Y +A X +A X +A X +B Y +C Z +C Z +C Z +C Z +B Y +A X +C Z +B Y +A Z +C Z +A Z +B X +B Y +A X +C Z +C Z +C X +A Z +A X +C Z +B Z +A X +A Z +C Y +A X +C Z +A X +C Z +C Z +A Y +A Z +B Y +A Z +C X +A Y +C Z +C Z +A Y +A Z +C Z +A Y +A X +A X +A Y +C Z +C Z +C Z +A Z +A Z +C X +A Z +C Z +A X +C Z +B Y +C Y +C Z +A Z +C Z +A Z +A Z +C Z +C Z +A Z +C Z +C X +A Z +B Y +A Y +C Z +C Z +C Z +C Z +B Y +A Z +A Z +A Z +C Z +A X +C Z +A Z +C Y +C X +C Z +C Z +C Z +A X +B Y +A X +C Y +C Y +A Z +A Z +B Y +A Y +A Z +A X +C Z +A Z +C Z +C Z +A Z +A X +A Z +A Z +A Z +C Z +C Z +A Z +C Z +A Z +B Y +A Z +C Z +A Y +B Y +B Y +C Z +A X +A X +C X +B X +B Y +C Z +B Y +C Z +C Z +B Y +C Z +A Z +A Y +C Z +C Z +C Z +B Y +C Z +C Y +C Z +A Z +A Z +B Y +A X +A X +C Z +B Y +C X +C Z +A Z +C Z +C Z +A X +A Z +A X +C Z +B Y +C Z +C Z +C Z +C Z +A Z +A Y +C Z +C X +A Y +A X +A X +A X +C X +A Z +B Y +B X +C Z +A Z +C Z +C Y +A Z +B Y +A X +A Z +A Y +C Z +A Z +A Z +A X +C Y +A Z +C Z +A X +B Y +C Z +A Y +C Z +C Z +B Y +A Y +C Z +A X +A X +A Y +C X +A X +C X +C X +C Z +A X +C Z +C Y +C Z +C X +B Y +C Z +C Y +A X +C Z +A X +B Z +A Y +A Z +C Z +C Z +C Z +C Z +A X +C Z +C Z +C Z +A Z +B Y +C Z +C X +B Y +A Z +C Z +B Z +C Z +A Z +C Z +A Z +B Y +A Z +C Z +C Z +C X +A X +A Z +B Y +C Z +A X +A Z +A X +B Y +C Z +A X +C Z +C Z +C X +C Z +C Z +C Z +A X +C Z +B Z +A Z +B Y +C Z +B Z +C X +C X +C Z +C Z +C Z +B X +C Z +C Z +C Z +A Z +B X +A Y +A Z +C Z +A Y +A Z +A X +A Z +A Y +A X +A Z +A Z +C Z +C Z +C Z +A Y +A X +A Y +B Y +C Z +B Y +C Z +C Z +A X +C X +A Z +C Z +B Y +A Z +C Z +B X +A Y +C Z +C Z +A Y +C Z +C Z +A X +C Y +C Z +A Z +A Z +A X +A Y +A Z +C Z +C Z +A Z +A X +C Z +A Y +B X +B X +A Z +A Z +C Z +A X +A X +C Z +C X +C Z +C Z +C Z +C Z +C X +C X +C Z +A Y +C Z +C Z +C Z +A X +B Y +A Z +C Z +A Y +A Y +A Z +C Z +C Z +A Z +A Y +A Z +C Z +C Z +B X +A X +C Z +C Z +A Z +C Z +A Z +C Z +A Z +A X +A X +A Z +A X +C Z +C X +A Z +C X +B Y +A X +A Z +A Z +C Z +A Y +A X +C X +A Z +C X +C Z +A X +C Z +C Z +B Y +B Y +C Z +C X +B Y +A Z +C Z +C Z +C Y +C Z +C Y +C Z +A X +A Y +B X +C Z +B Y +A Y +A X +C X +A Z +A Y +C Z +B Y +A Y +C X +A Z +A Y +A X +C Z +C Z +C Z +C Z +A X +A Y +B Y +C Z +C Y +A X +A X +A Z +A Z +A Z +A Z +A Z +C Z +A Z +C Y +A Y +A Y +B Y +A Z +A Z +A Y +C Z +C Z +A Z +B Y +B Y +C Z +B Y +A X +B Y +A Y +B Y +C X +B Y +A X +B Z +C Z +C Z +C Z +C Z +A Y +C Z +A Z +A Y +B Y +A X +C Z +B X +C Z +C Z +C Z +A Z +A Z +A Z +A X +C Y +A Z +B Y +C Z +C Z +C Z +A X +B Y +B Z +C Z +C Z +C X +A Z +A X +A X +C Z +A Z +A X +C Z +A X +A Z +A Y +C Z +A Y +C X +A Z +A X +A Z +C Z +B Z +A Y +A X +C X +C Y +B Y +A X +C Z +C Z +C Z +C X +C Z +C X +C Z +C Z +A Z +A Z +B Y +A Y +C X +A X +C Z +A X +C Z +C Z +B Y +A Z +A Y +B Y +A X +C Z +A Y +A Z +C Z +B Y +A X +C Z +B Y +C Z +A Z +B Y +C Y +C X +B Z +A Z +C Z +A Z +A Y +C Z +A Z +C Z +C Z +C Z +A Y +C Z +C Z +A Z +B Z +C Z +C Z +C X +A Z +C X +B X +C X +A Y +C Z +A Z +A Y +C X +A X +B Y +C Y +A Z +A Z +C Y +C X +A X +A Z +C Z +A X +A Z +C X +A X +B X +C Z +C Z +A X +C X +A Z +A Z +A Y +C Z +A X +B Y +C Z +A Z +C X +A X +C Z +B Y +A X +B Y +A Y +C Y +A Y +C Y +A X +A Z +C Z +B Y +C Z +C Z +B Y +A X +A Y +B Y +A X +B X +A Z +C Z +C X +A Z +A X +C Z +A Y +C Z +A Z +A Z +A Z +A Y +A Z +B Y +C Z +C X +C X +C Z +A Z +A Z +A X +B Y +C Z +A Z +C X +B X +C Z +C Z +A Z +C Z +C Z +A Z +B Y +A X +B X +B Y +A Z +A Z +A Z +A Z +A Y +C Z +C Z +C Y +B Y +B Y +B Y +C Z +C Z +A X +A Y +C Z +B Y +B Z +A X +C Y +C Z +A X +C Z +C X +A X +C Z +C Z +A Y +A X +A Z +A Z +A Y +C Z +A Z +C X +B Z +C Z +B Y +A Y +C Z +C Z +A X +C Z +C X +C X +A Z +A Y +A Y +B Y +C X +C Z +A Z +C X +B Y +A Z +C Z +A Y +C Z +A Z +C Z +A X +C X +A X +A X +A Y +B Y +C Z +C Z +A X +C Z +A Y +A Z +A Y +B Y +C Z +A Z +A Z +A Z +A Y +C Y +B X +A X +C Z +A Y +C Z +A Y +B Z +A X +C Z +A Z +C Z +A Z +A X +C X +A X +A X +A Z +A Z +C X +B Y +C Z +C Y +A Z +A Z +A Z +A Z +A Z +A X +B Z +B Y +A Y +C Z +A Z +B Y +A Z +C Y +A Y +A X +C Z +A Z +C Z +C Z +C Y +A Z +C Z +A X +A Z +A Z +B Y +C Z +C Z +C Z +C Z +C Z +C Z +C Z +B Y +C Z +C Z +A Z +C Z +B Y +C X +C X +C Z +C Z +C Z +A Z +B Y +A X +C Z +B Y +B Y +C Z +A X +C Z +C X +C Z +B Y +B Y +C Z +A Z +C Z +C X +B Y +C Z +A Z +C Z +C Z +C Z +C Z +A Y +C Y +A Y +C Z +C Z +A X +A Z +C Y +C Z +A X +B Z +C X +C Z +A Z +C Z +C X +C Z +C Y +A X +A Z +A Y +A X +B X +A Z +A Y +A Z +B Y +A Z +B Y +B Y +C Z +A Z +C Z +C Z +A X +A X +C Z +C Z +C Z +C Z +C X +A Y +C Z +C Z +A Z +A Y +C Z +A Z +B Y +C Z +C Z +C Z +C Z +A Z +B Y +B Z +B Z +A Z +A Y +A X +C Z +B X +C Z +B Y +A X +C Y +A Y +C Z +C Z +C X +C Z +C X +C X +A Z +A X +A Z +C Z +B X +A Z +C Z +C Z +A Z +A Y +C X +A X +C Z +A X +A Y +A X +A X +A Z +A Z +C Z +A Z +A Z +A Z +B Y +A Z +C Z +A Y +C Z +C Z +A Z +A Y +A Y +C X +A X +B Z +A Z +C Z +A Z +A Y +A X +B Y +B Y +A Y +A Z +A Z +B X +C X +A Z +C Z +C X +C Z +C Z +A X +C Z +C Z +B Y +A Z +A Z +A Y +A Z +A Y +C Z +C Z +C Z +C Z +B Y +B Y +A Z +C Z +A Z +A X +C Z +C Z +A Y +C Z +B Y +A X +A X +A Z +C Z +C Z +C Y +C Z +A X +C Z +A Z +C Z +B Y +A Z +C Z +B Y +B Y +C Z +A Y +C Z +C Y +A Z +A X +A X +C Z +A Y +C Z +A Z +C Z +A X +A X +A Z +A Z +C Z +B Y +C X +A Y +C Z +C Z +A X +C Y +A Y +C Z +C Y +A Z +B Z +C Z +A Z +B Y +B Y +A Z +C Z +A X +A Z +C Z +A Z +C Z +C Z +B Y +B Y +A X +B Y +A Z +C Z +A Z +A Z +C Z +A Y +C Y +C Z +A X +C Z +A Z +C Z +C Z +C Y +C Z +A Z +C Z +C Z +B Y +A Z +C Z +B X +B Y +A Y +C Z +A Z +B Y +A Z +C Z +C X +C Z +A Y +A Y +A Y +B Y +C Z +A Z +A Z +C Z +A Z +C X +A Z +A Z +A X +A Z +A Y +C Z +A Z +C Z +A Z +A X +C Z +C X +C Z +C Z +C Z +C Z +C Z +B Y +C Z +A Y +C Z +B Y +C X +C Z +C Z +C Z +B X +A X +C Z +C Z +C X +C Z +A Y +C Z +A Z +A Z +C Z +C Z +C Z +A Z +C Z +A X +A Z +C Z +A Z +C Z +A X +C Z +C Z +C X +A Z +C Z +C Z +C Z +C Z +A X +A Z +A X +C Z +B Y +C X +B Y +A Z +C Z +C Z +A X +A Z +A Y +A X +A Z +B Z +B Y +C Z +C Z +A Y +C Z +B Y +C Z +B X +A Z +C Z +A Y +A Z +A Z +B Y +C X +A Y +C Z +C Z +C Z +B Z +B Y +B X +A X +A X +C Z +C Z +C X +A Y +C Z +C Z +C Y +C Z +A Z +A X +C Z +B Y +C Y +A Z +C Z +A X +C Z +C Z +A X +A Y +C Z +A Y +C Z +A X +C Z +C Z +C Z +C Y +B Y +A Z +C Z +C X +B Y +A Y +B Y +C Z +C Z +A X +C Z +C Y +A Z +A X +A Y +C Z +B X +B Y +C Z +A Z +B Y +A Y +C Z +A X +B Y +A X +C Z +A Z +C Z +B Y +A Z +C X +B Y +A Y +A Z +A Z +A X +B Y +B Y +C Z +A X +C X +A Z +B Y +A X +B Y +C Z +A Z +A Z +C Z +C Z +A Z +A X +C Z +B Y +C Z +C Z +A Z +C Z +A Z +B Z +A Z +C Z +A Z +A X +A X +A X +A Y +C Z +C Y +C Z +C Y +A X +A X +A Y +C Z +A Y +C Z +C Z +C X +B Y +C Z +C Z +C Y +B Y +A X +B X +A Z +C Z +B Y +A Z +B Y +A Y +A Z +B Z +A Y +A Y +A X +A Z +A Y +B Y +C Z +A X +C Z +B Y +A Z +C Z +A Z +A X +B Y +C Z +A Z +A Y +C X +B Y +C Z +C X +A X +C Z +A Y +C Z +A X +B Y +C Y +C Z +A Y +C Z +A Z +A Z +A Z +C Z +C X +B Y +B Z +C Z +C Z +C Z +A Z +C Z +C Z +A Z +A Z +B Y +C Z +A X +A Y +A X +A Y +C Z +C Z +B Y +A X +A Z +A Z +A Z +C Z +B Z +C Y +C Z +B Y +C Y +C Z +A Z +C Z +C X +A Z +A Z +B Y +A Z +C Z +A Y +A X +A Z +A Y +C Z +C Z +B Y +B Y +C Z +C Z +C Z +C X +A Z +A Z +C Z +B Y +C X +B X +C Z +A Z +C Y +C Z +C Z +A X +C Z +C Z +C Z +A Z +A Y +C Z +B Y +C Z +A X +B X +C X +C Z +A Z +C Z +A Z +A Z +C Z +A Y +A Z +C Z +A Z +A Z +A X +C X +C X +A X +C Z +B Y +B Y +A Z +A Z +A X +A Y +B Y +C Y +A Z +A Z +C Z +A X +C Z +A Y +B Y +C X +A Y +C Z +C Z +C Z +A Z +A Z +C Y +A X +A X +A X +C X +C X +A X +C Z +A X +B Y +A Z +A Z +C Z +A X +A X +A X +C Z +C Z +C Z +A Z +C Z +A Z +A Z +A X +A Y +A Y +C Z +B Y +A Y +A Z +B Y +B Y +C Z +B Y +A Y +C X +A Z +A Y +C Z +C Z +A X +A Z +B Y +C Z +A Y +A Z +A Z +A Z +C Z +A Z +B Y +C Z +A Z +A Z +A Z +A Y +A X +B Y +A Z +A Z +B X +A Y +C Z +C Z +A Z +A Z +B Y +A Y +C Z +A Z +C Z +C X +C Z +C X +C Z +B Y +A Y +C Z +B Y +A X +B Y +B Y +A Z +C Z +A X +A X +C Z +A X +A Z +C Z +C Z +B Y +A Z +C Z +C Z +C Z +C X +A Z +A Z +C Z +A Z +C Z +C Z +C X +B Y +A X +A Z +A X +C Z +A Y +C Z +C Z +A X +C Z +B X +A Z +A Z +C Z +C Z +A Y +A X +A Z +A Z +C Z +C Z +C Z +C Z +C Z +B Y +A Y +A Z +C Z +C Z +C Z +C Z +C Z +C X +A Y +C X +C Z +C Z +A X +A Z +A Z +C Z +B Z +A Z +B Y +A Z +C Z +C Y +A Z +C Z +C Z +A X +C Z +C Z +B Y +A Y +B Y +C Z +A Z +B X +C Z +A Y +B Y +C Y +A Z +A Y diff --git a/src/Year_2022/files/P3.txt b/src/Year_2022/files/P3.txt new file mode 100644 index 0000000..5282006 --- /dev/null +++ b/src/Year_2022/files/P3.txt @@ -0,0 +1,300 @@ +NLBLfrNNLvqwbMfDqSjSzzSJjjggcdVs +lTRGPPZnRRHszcsZdSsccZ +CFTTFtFHTtCtDDzrmBtrBD +BJldgBWnRgWNWtllSlWShMcLcVSvVjbVVVvDVVVL +HFGFwqQPQGwHrTFpwmThMbDDVcVmLvvshj +HrpHrGPZZCQrfqlNdtMlzfMltlgn +hQL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rpwlZrwpznLpl +VVJbbVfStVHJJVtGmvsfjvssFFTvvsQj +pBCqCqhWjpnWCnffJDjfWzJBZdcvwcPdvJvJcgcrdGdvggrv +tlhbHbmNTbQgbGRvbZGrcg +tVFLQNVlmTmQLQhpzMCBzCpzjjFMnz +qhWHwNqLHrLJjqgHddFchMdnnGnRhMcR +pTzTPVfZQPffNVtVVZfptRGsRbbbbcDsMMZsMZMdRn +CfzPVzCfPBzPBqvWqgBwjNLjjS diff --git a/src/Year_2022/files/P4.txt b/src/Year_2022/files/P4.txt new file mode 100644 index 0000000..29559d0 --- /dev/null +++ b/src/Year_2022/files/P4.txt @@ -0,0 +1,1000 @@ +7-50,8-33 +76-83,77-87 +68-73,55-68 +13-37,12-25 +7-7,12-96 +9-22,10-12 +52-77,12-52 +43-83,44-60 +33-90,78-89 +10-10,9-50 +6-89,7-98 +10-11,11-60 +8-75,7-94 +23-23,23-23 +65-78,23-64 +5-97,96-96 +93-96,76-80 +15-47,14-16 +16-17,17-43 +28-39,8-41 +40-70,40-41 +32-89,57-88 +39-76,40-64 +13-96,55-69 +56-80,57-81 +57-82,58-82 +57-57,44-58 +33-54,33-53 +9-91,91-96 +58-68,33-57 +6-65,4-5 +2-88,3-88 +23-69,23-98 +1-99,2-60 +15-70,15-71 +45-67,2-68 +37-64,5-59 +3-79,2-79 +38-83,38-83 +4-4,5-98 +43-74,43-75 +4-99,2-5 +31-42,42-42 +24-28,27-30 +2-80,2-81 +33-66,30-62 +80-93,80-80 +30-81,81-93 +17-96,16-84 +48-86,47-62 +62-74,61-74 +8-37,37-67 +22-98,21-98 +29-29,29-58 +27-85,5-85 +95-98,1-96 +99-99,24-97 +19-22,21-83 +34-82,82-83 +13-76,31-92 +44-86,77-85 +15-47,15-47 +25-54,26-55 +20-38,3-37 +3-15,4-74 +78-78,19-78 +15-25,18-24 +71-87,86-86 +9-99,99-99 +25-68,24-24 +42-89,31-42 +47-67,48-74 +34-61,20-34 +2-80,1-3 +5-6,5-74 +4-67,5-53 +20-20,21-88 +7-48,5-8 +14-62,14-14 +49-79,42-78 +23-28,22-22 +21-87,21-86 +57-95,57-95 +36-53,12-77 +12-46,13-57 +52-84,85-88 +41-73,73-73 +84-94,64-95 +93-94,12-94 +1-99,1-99 +6-6,6-70 +3-99,7-98 +96-99,3-97 +18-84,17-85 +56-99,8-57 +7-83,8-84 +51-82,50-83 +7-77,7-8 +58-76,59-77 +13-79,14-79 +7-7,8-85 +15-17,16-28 +17-79,16-79 +74-74,1-73 +28-28,28-65 +59-62,59-66 +48-69,46-47 +14-23,3-24 +35-83,83-98 +55-84,55-83 +10-20,7-19 +13-88,21-88 +62-62,62-85 +32-32,33-33 +49-86,15-90 +2-3,2-38 +1-1,2-93 +40-52,22-41 +41-82,82-92 +42-79,41-59 +53-99,52-99 +52-68,6-55 +30-65,31-65 +56-90,8-91 +83-93,17-82 +5-84,4-70 +56-56,56-97 +5-44,4-81 +85-91,90-90 +23-51,22-22 +12-15,14-68 +28-28,28-84 +1-6,10-32 +5-86,50-88 +8-20,19-19 +62-80,62-81 +50-77,76-97 +3-97,3-96 +14-77,37-39 +82-84,29-82 +6-31,1-24 +62-71,46-61 +13-13,11-15 +3-9,4-17 +32-97,11-98 +89-90,23-89 +51-59,48-60 +53-74,53-74 +30-30,29-71 +8-70,8-9 +65-65,65-66 +34-85,96-99 +36-40,36-36 +42-42,42-72 +2-43,33-69 +4-31,30-77 +69-84,70-92 +26-95,27-98 +3-3,6-89 +34-88,51-79 +63-63,3-63 +8-8,8-61 +30-87,13-84 +38-38,37-50 +24-87,10-93 +6-88,3-4 +19-70,19-69 +36-92,31-37 +17-94,14-18 +56-61,49-74 +30-62,29-62 +20-25,21-87 +12-76,12-12 +94-96,54-95 +1-99,4-77 +40-40,16-41 +72-90,14-73 +8-93,7-92 +10-95,41-98 +29-36,19-51 +79-93,70-94 +11-18,17-95 +3-97,2-98 +52-67,53-53 +13-46,12-45 +5-68,4-94 +16-73,15-15 +11-40,33-33 +76-83,82-85 +28-35,40-92 +53-93,12-83 +2-61,58-60 +4-51,4-4 +18-43,17-56 +93-93,14-93 +95-98,16-96 +32-39,36-41 +9-73,6-9 +55-55,36-56 +20-98,20-99 +2-58,18-99 +5-6,9-75 +21-90,77-82 +88-99,7-89 +21-44,14-38 +82-97,69-82 +12-12,13-87 +46-81,98-99 +15-82,14-83 +12-51,11-12 +3-94,4-94 +9-33,10-86 +20-93,19-50 +27-84,53-83 +79-80,3-79 +73-90,78-89 +96-96,93-98 +93-98,54-93 +33-82,6-33 +1-9,9-27 +14-14,15-63 +4-94,5-95 +16-90,15-90 +47-78,47-79 +4-75,3-75 +3-96,96-99 +38-66,19-92 +16-56,12-14 +37-47,46-47 +4-70,1-70 +26-58,48-72 +38-97,43-93 +76-84,76-78 +13-55,5-14 +66-78,62-92 +42-87,41-86 +3-21,4-62 +10-63,9-63 +9-67,8-67 +10-92,92-92 +96-98,79-95 +19-53,99-99 +4-64,4-63 +46-60,14-59 +2-90,1-89 +16-25,9-11 +8-98,8-97 +3-92,3-91 +65-87,64-88 +4-67,3-4 +66-88,78-87 +14-82,76-81 +12-85,11-84 +30-53,12-52 +53-60,7-61 +73-73,5-73 +55-55,55-57 +14-16,10-15 +23-29,22-22 +64-82,38-63 +38-68,69-69 +9-79,10-56 +43-87,42-88 +30-63,31-62 +25-25,24-83 +31-31,31-75 +2-96,17-99 +31-37,35-36 +3-42,2-43 +82-97,19-82 +38-94,95-97 +1-87,88-99 +47-87,46-84 +4-54,53-55 +80-96,3-81 +5-5,4-98 +35-50,24-36 +7-78,12-94 +45-70,69-73 +32-32,32-63 +61-71,39-72 +35-35,34-35 +80-81,22-82 +34-62,5-34 +19-21,18-19 +24-87,25-87 +34-97,34-98 +5-91,64-92 +19-49,19-98 +27-50,49-51 +10-70,69-71 +10-66,66-66 +66-99,65-66 +3-33,32-53 +23-32,8-34 +90-91,37-90 +41-77,53-76 +57-57,30-57 +35-37,36-48 +46-86,46-67 +60-83,60-61 +15-21,35-56 +60-91,60-91 +12-30,3-29 +89-90,82-92 +24-53,25-53 +13-60,14-61 +44-45,41-48 +24-94,93-94 +28-59,60-85 +94-98,66-93 +11-94,46-93 +89-93,44-89 +72-93,30-72 +22-40,23-35 +14-94,15-97 +51-86,48-76 +90-90,66-91 +58-74,10-71 +27-34,36-42 +1-96,96-97 +25-94,24-24 +9-28,1-10 +14-15,15-92 +5-26,25-25 +98-99,32-98 +12-71,11-11 +77-81,80-96 +30-66,40-65 +26-54,33-53 +17-78,18-18 +9-94,9-10 +87-95,37-88 +15-93,86-92 +30-82,29-82 +58-93,57-71 +20-75,60-67 +1-89,88-88 +19-95,19-94 +13-95,12-14 +34-67,33-67 +35-97,31-35 +54-99,54-98 +6-92,18-36 +31-59,30-30 +1-75,74-81 +44-47,45-45 +26-75,3-26 +35-36,36-71 +7-7,8-29 +32-88,33-74 +11-66,47-65 +29-93,28-94 +79-85,20-78 +8-60,52-60 +39-41,40-80 +4-90,6-90 +49-86,87-87 +8-8,9-99 +7-59,10-92 +30-93,11-30 +16-31,30-30 +33-62,33-33 +10-25,10-24 +15-59,40-85 +16-94,94-95 +1-2,1-99 +77-91,54-78 +10-76,34-72 +2-90,2-89 +26-54,23-58 +3-82,2-99 +20-65,21-21 +42-67,31-43 +18-51,3-19 +9-73,52-72 +19-40,18-41 +53-66,65-72 +3-99,76-97 +73-73,15-73 +11-15,11-11 +20-71,20-72 +60-74,54-75 +6-91,8-90 +35-52,35-53 +17-94,96-96 +8-84,30-65 +21-82,16-22 +84-89,43-90 +41-81,41-80 +39-48,38-94 +13-59,13-60 +39-40,40-86 +11-11,10-90 +76-76,68-76 +26-93,25-27 +78-94,68-77 +88-95,7-88 +3-20,19-74 +88-93,25-65 +6-6,6-51 +12-15,22-97 +18-22,18-19 +65-84,65-84 +37-94,34-35 +8-28,7-36 +53-83,53-55 +3-99,4-79 +2-43,31-43 +52-68,52-84 +12-53,11-11 +69-74,64-75 +4-5,5-98 +11-47,12-21 +61-87,88-89 +3-3,4-98 +24-80,83-86 +2-55,1-54 +92-92,46-92 +14-26,14-27 +3-57,1-4 +57-64,56-92 +78-78,11-78 +48-48,49-90 +79-80,53-80 +7-53,8-47 +48-81,47-75 +28-88,27-87 +12-66,12-66 +29-92,37-92 +10-99,98-99 +58-72,57-73 +24-78,77-83 +1-24,23-83 +30-57,57-82 +39-72,40-46 +8-85,7-86 +24-43,24-40 +1-98,1-99 +35-79,35-80 +54-68,67-76 +6-89,4-90 +99-99,13-69 +5-5,6-42 +3-88,27-89 +91-91,2-92 +32-69,34-68 +53-79,53-85 +21-22,22-88 +10-69,7-11 +3-81,9-68 +7-42,3-86 +52-58,57-69 +44-74,42-74 +3-22,4-18 +20-62,62-92 +84-87,20-85 +3-69,3-3 +40-48,47-67 +9-9,8-99 +3-92,2-10 +20-20,18-20 +5-93,7-93 +52-76,15-77 +14-87,14-88 +43-46,44-49 +2-3,6-92 +28-66,24-82 +2-88,3-87 +43-87,42-92 +2-3,3-95 +45-49,44-50 +30-83,29-82 +24-81,25-57 +76-77,77-77 +18-85,4-90 +57-57,19-57 +9-99,3-10 +45-50,44-50 +3-99,2-79 +38-61,41-62 +63-87,64-87 +1-86,98-98 +51-58,50-54 +31-41,31-31 +20-85,10-19 +8-97,8-8 +16-64,64-89 +1-4,3-92 +12-68,13-69 +45-46,46-90 +84-98,53-84 +32-49,46-48 +55-93,55-92 +3-4,6-21 +6-99,3-7 +52-90,19-88 +7-7,8-85 +53-95,53-53 +69-87,68-88 +33-34,15-34 +22-38,4-39 +67-83,68-68 +52-89,53-68 +30-85,53-84 +26-94,26-95 +11-37,11-96 +86-92,17-93 +33-78,33-78 +9-81,80-80 +46-53,53-53 +44-63,62-98 +1-78,1-78 +31-61,16-29 +16-88,16-96 +9-51,9-50 +34-53,35-54 +18-98,18-18 +31-66,6-16 +28-35,36-52 +98-99,60-97 +25-35,25-25 +60-90,84-89 +13-15,1-21 +2-23,2-24 +2-91,90-93 +25-32,31-80 +55-62,56-63 +24-43,42-91 +63-82,62-84 +5-9,31-87 +47-63,48-76 +62-88,62-87 +26-73,26-72 +25-41,26-42 +10-77,76-76 +82-87,2-83 +1-96,1-97 +9-56,18-55 +2-93,3-92 +58-94,62-97 +71-97,12-69 +15-91,90-90 +49-60,50-60 +73-84,83-83 +57-91,10-58 +12-70,11-69 +3-53,52-67 +13-94,94-96 +90-92,2-68 +4-74,74-82 +16-95,20-97 +17-30,17-31 +41-50,5-28 +18-34,17-98 +37-66,15-99 +2-43,1-1 +1-58,38-70 +5-7,6-24 +38-54,54-63 +6-20,5-7 +72-93,83-90 +89-90,34-89 +8-18,7-14 +1-54,2-53 +45-87,45-46 +6-24,5-5 +5-81,1-3 +4-5,4-97 +38-38,38-70 +4-91,5-98 +52-69,51-53 +18-45,18-44 +99-99,4-99 +32-93,35-93 +25-95,15-30 +35-38,34-75 +25-29,26-64 +30-51,30-52 +36-37,37-40 +14-81,13-15 +19-85,18-85 +15-88,16-16 +21-96,22-95 +29-31,30-68 +22-85,22-48 +19-84,18-79 +63-63,24-64 +51-79,51-80 +21-38,37-44 +19-72,4-18 +30-95,30-94 +1-88,89-98 +4-5,4-83 +95-97,74-95 +2-83,83-83 +89-94,93-98 +27-93,19-28 +43-43,44-88 +86-89,87-87 +1-3,5-66 +98-99,59-97 +4-80,5-21 +5-5,4-85 +15-82,16-97 +49-50,48-49 +8-89,89-90 +14-15,15-25 +42-48,47-49 +9-48,8-10 +21-84,21-83 +97-99,1-97 +22-90,90-95 +18-73,72-76 +87-91,68-80 +21-22,22-44 +5-91,90-97 +25-97,96-98 +8-22,1-7 +4-77,4-30 +43-43,44-64 +43-43,43-88 +39-56,40-57 +15-90,16-71 +25-78,85-97 +27-78,26-79 +61-70,66-67 +8-94,96-98 +11-16,30-89 +9-55,9-54 +53-92,53-54 +1-98,1-99 +29-30,31-76 +81-83,27-80 +75-85,75-85 +18-94,11-12 +2-11,11-93 +1-4,3-84 +2-62,1-61 +2-96,2-95 +1-87,86-88 +71-78,75-75 +96-96,6-97 +6-8,8-44 +64-86,85-99 +3-11,9-11 +31-92,14-92 +8-96,14-97 +6-94,5-93 +5-67,5-66 +10-14,13-92 +14-74,13-73 +21-96,96-97 +56-66,62-65 +7-77,7-77 +88-92,18-73 +9-63,19-93 +1-84,18-84 +12-85,9-12 +28-28,29-94 +18-37,17-36 +20-93,93-94 +33-52,4-60 +35-93,65-82 +27-27,27-67 +22-92,22-77 +45-50,45-64 +8-99,8-98 +1-1,2-90 +4-62,5-63 +22-44,4-45 +92-94,14-95 +3-95,39-94 +29-96,95-95 +21-96,21-95 +65-71,66-91 +88-94,58-89 +13-84,1-83 +13-87,12-86 +29-48,28-36 +6-90,6-89 +37-70,36-38 +20-79,21-80 +32-89,30-89 +8-76,8-8 +52-74,51-75 +6-89,5-89 +59-77,60-76 +35-83,35-35 +52-78,49-98 +39-88,22-35 +27-32,27-27 +13-50,12-13 +61-61,61-61 +13-85,12-14 +17-25,26-95 +57-71,41-73 +50-76,49-49 +87-87,18-88 +95-95,41-96 +53-54,52-53 +6-44,5-98 +1-88,88-93 +13-29,29-81 +9-70,3-6 +92-97,41-92 +14-48,3-5 +2-5,3-20 +39-83,55-83 +83-83,8-83 +14-52,2-15 +7-64,8-63 +50-76,50-77 +1-78,1-77 +3-80,2-2 +96-96,47-96 +99-99,65-99 +52-74,9-53 +25-53,25-54 +18-18,18-73 +47-52,16-48 +83-88,83-88 +3-7,6-75 +8-93,9-76 +57-57,30-59 +61-61,62-96 +73-88,73-88 +17-41,11-40 +49-49,48-69 +1-62,1-54 +15-26,15-45 +6-56,5-5 +4-99,2-3 +15-89,88-93 +22-22,17-22 +12-85,12-12 +89-99,62-90 +53-95,53-95 +4-64,10-74 +6-42,4-6 +11-41,20-22 +49-50,48-49 +11-85,12-84 +32-32,26-31 +40-67,8-39 +17-17,16-93 +12-54,13-55 +43-44,43-43 +33-35,34-93 +2-8,7-64 +30-91,31-91 +70-70,15-74 +36-36,36-80 +23-23,3-24 +18-40,25-40 +36-99,35-45 +45-83,83-84 +90-90,9-91 +24-25,23-23 +12-91,11-90 +30-37,30-38 +24-94,25-98 +30-67,29-29 +4-50,8-51 +63-95,14-85 +14-14,15-32 +2-3,2-86 +27-41,26-42 +6-86,86-86 +34-70,34-69 +89-97,2-90 +59-75,59-74 +58-94,58-93 +6-75,2-75 +44-73,43-45 +50-61,50-70 +6-92,7-7 +34-88,35-92 +2-96,97-99 +10-91,10-91 +1-94,2-23 +21-40,21-39 +19-87,87-95 +6-75,2-18 +22-72,15-73 +9-96,42-96 +16-16,16-87 +27-84,26-83 +94-97,2-94 +45-58,56-56 +10-16,22-71 +34-55,43-78 +94-98,9-99 +1-90,89-95 +1-84,29-85 +13-70,70-71 +58-86,4-87 +1-41,41-55 +36-71,37-72 +65-68,45-69 +30-30,31-31 +35-69,35-68 +58-94,58-95 +10-94,93-98 +53-94,23-54 +47-51,48-48 +7-86,7-7 +28-44,23-29 +7-73,6-7 +5-88,5-88 +10-92,9-9 +18-71,17-72 +7-16,15-78 +41-42,42-78 +9-32,8-96 +51-52,32-52 +24-76,23-87 +2-99,2-2 +95-95,1-95 +42-92,92-92 +21-85,88-93 +75-75,1-75 +70-71,3-72 +39-87,32-42 +1-1,3-85 +55-57,56-70 +16-39,15-16 +25-26,26-87 +14-79,33-73 +53-64,14-53 +96-99,2-97 +32-91,33-95 +85-92,25-86 +4-96,1-3 +69-98,51-69 +24-76,75-75 +60-93,68-85 +51-51,52-90 +25-30,30-34 +10-90,11-89 +1-96,1-97 +42-61,42-62 +30-71,29-31 +26-35,17-36 +7-84,7-83 +18-25,18-24 +9-86,21-87 +3-27,26-51 +56-97,55-56 +47-74,48-96 +5-35,6-92 +35-70,27-37 +2-2,2-90 +18-64,18-63 +1-3,3-78 +14-36,13-42 +12-53,19-58 +55-91,56-62 +14-24,23-64 +9-32,33-86 +40-64,40-63 +25-92,25-92 +49-51,55-69 +13-46,13-45 +46-75,45-76 +2-77,2-76 +21-88,3-96 +7-12,12-92 +46-91,45-92 +7-78,57-79 +2-2,1-97 +78-87,8-79 +28-75,27-74 +5-81,80-83 +30-63,29-64 +69-80,32-70 +2-78,1-79 +13-15,14-74 +79-84,83-84 +68-69,11-69 +9-43,9-44 +92-99,92-92 +90-97,35-90 +13-68,13-13 +3-87,1-3 +47-52,48-53 +27-94,8-28 +46-93,44-52 +8-56,8-95 +50-57,44-58 +4-18,2-2 +3-77,76-76 +17-17,18-83 +2-93,20-23 +94-94,5-95 +73-82,3-74 +31-49,48-81 +40-43,9-41 +74-74,74-85 +10-95,3-95 +14-22,21-78 +2-96,1-4 +26-66,11-66 +48-48,6-49 +12-86,85-94 +81-83,80-83 +3-29,30-77 +55-90,47-91 +5-83,1-6 +7-19,6-6 +36-39,37-43 +11-60,17-45 +8-83,3-21 +11-11,11-79 +25-31,35-97 +30-46,46-47 +24-24,25-78 +6-96,5-7 +73-83,13-84 +15-99,14-82 +84-98,84-99 +7-61,42-61 +2-37,37-37 +9-9,9-34 +40-42,41-85 +11-33,10-32 +2-9,8-64 +92-92,86-93 +7-38,7-37 +16-92,2-17 +2-3,3-50 +1-95,2-96 +38-87,67-87 +5-21,21-22 +38-47,24-70 +4-44,3-81 +84-85,1-84 +22-99,21-96 +70-72,59-72 +15-96,16-96 +6-76,6-6 +83-83,78-83 +26-37,25-25 +9-43,3-43 +81-81,80-80 +47-51,49-53 +97-97,29-98 +23-47,46-46 +28-84,29-85 +1-94,1-95 +14-72,13-15 +61-95,4-78 +9-89,9-9 +10-12,11-90 +50-54,19-50 +97-98,9-98 +15-94,16-28 +77-77,25-76 +20-74,19-28 +1-99,2-41 +29-79,79-79 +30-88,30-87 +24-98,75-91 +15-65,14-65 +67-77,67-78 +5-86,2-4 +3-81,4-82 +40-90,39-91 +19-51,19-19 +48-67,42-67 +17-60,24-47 +27-81,18-82 +48-87,66-87 +35-96,34-89 +16-23,22-50 +7-85,85-85 +7-43,6-42 +26-75,27-27 +6-10,9-64 +18-38,14-39 +45-85,84-89 +30-98,98-98 +84-93,14-85 +8-57,8-56 +24-91,23-92 +79-93,79-94 +37-60,16-37 +2-81,5-80 +80-92,81-99 +5-40,5-40 +10-44,44-48 +5-15,14-42 +8-68,2-6 +30-78,53-77 +81-88,29-80 +98-99,6-98 +42-99,98-98 +63-63,17-63 +41-98,41-97 +1-99,2-98 diff --git a/src/Year_2022/files/P5.txt b/src/Year_2022/files/P5.txt new file mode 100644 index 0000000..39caf42 --- /dev/null +++ b/src/Year_2022/files/P5.txt @@ -0,0 +1,511 @@ +[N] [R] [C] +[T] [J] [S] [J] [N] +[B] [Z] [H] [M] [Z] [D] +[S] [P] [G] [L] [H] [Z] [T] +[Q] [D] [F] [D] [V] [L] [S] [M] +[H] [F] [V] [J] [C] [W] [P] [W] [L] +[G] [S] [H] [Z] [Z] [T] [F] [V] [H] +[R] [H] [Z] [M] [T] [M] [T] [Q] [W] + 1 2 3 4 5 6 7 8 9 + +move 3 from 9 to 7 +move 4 from 4 to 5 +move 2 from 4 to 6 +move 4 from 7 to 5 +move 3 from 7 to 3 +move 2 from 5 to 9 +move 5 from 6 to 3 +move 5 from 9 to 1 +move 3 from 8 to 4 +move 3 from 4 to 6 +move 8 from 1 to 8 +move 1 from 8 to 6 +move 2 from 8 to 2 +move 5 from 8 to 4 +move 1 from 8 to 1 +move 6 from 6 to 4 +move 1 from 7 to 9 +move 5 from 1 to 7 +move 1 from 1 to 2 +move 2 from 9 to 8 +move 6 from 4 to 9 +move 1 from 6 to 8 +move 3 from 2 to 7 +move 4 from 2 to 8 +move 4 from 9 to 3 +move 6 from 5 to 4 +move 7 from 8 to 1 +move 10 from 4 to 1 +move 12 from 1 to 5 +move 1 from 4 to 9 +move 1 from 2 to 3 +move 2 from 9 to 1 +move 1 from 9 to 3 +move 1 from 6 to 7 +move 1 from 9 to 1 +move 3 from 1 to 3 +move 9 from 5 to 9 +move 2 from 2 to 7 +move 2 from 7 to 4 +move 3 from 9 to 4 +move 7 from 5 to 7 +move 5 from 1 to 3 +move 2 from 4 to 5 +move 1 from 4 to 6 +move 1 from 6 to 9 +move 4 from 9 to 2 +move 12 from 7 to 9 +move 2 from 4 to 9 +move 6 from 5 to 9 +move 3 from 7 to 6 +move 12 from 9 to 6 +move 5 from 9 to 1 +move 1 from 7 to 6 +move 14 from 6 to 1 +move 20 from 3 to 5 +move 5 from 9 to 5 +move 3 from 2 to 8 +move 1 from 6 to 4 +move 1 from 9 to 2 +move 1 from 4 to 6 +move 1 from 2 to 6 +move 16 from 1 to 5 +move 1 from 2 to 1 +move 12 from 5 to 6 +move 1 from 8 to 4 +move 29 from 5 to 1 +move 5 from 6 to 9 +move 20 from 1 to 3 +move 4 from 1 to 3 +move 11 from 3 to 8 +move 1 from 4 to 3 +move 4 from 9 to 8 +move 7 from 1 to 8 +move 2 from 3 to 2 +move 2 from 6 to 7 +move 1 from 9 to 8 +move 10 from 3 to 5 +move 1 from 6 to 1 +move 1 from 7 to 2 +move 3 from 1 to 2 +move 6 from 2 to 4 +move 2 from 6 to 3 +move 4 from 6 to 5 +move 1 from 6 to 2 +move 1 from 2 to 9 +move 6 from 5 to 2 +move 1 from 9 to 3 +move 24 from 8 to 7 +move 1 from 4 to 8 +move 5 from 5 to 4 +move 1 from 4 to 8 +move 1 from 8 to 7 +move 2 from 8 to 9 +move 1 from 9 to 7 +move 6 from 2 to 4 +move 10 from 3 to 7 +move 3 from 5 to 3 +move 1 from 9 to 8 +move 3 from 3 to 8 +move 4 from 8 to 7 +move 1 from 4 to 6 +move 1 from 6 to 4 +move 13 from 4 to 3 +move 17 from 7 to 6 +move 1 from 6 to 3 +move 2 from 4 to 8 +move 3 from 7 to 5 +move 14 from 6 to 7 +move 1 from 5 to 9 +move 1 from 5 to 9 +move 2 from 6 to 7 +move 1 from 5 to 1 +move 1 from 1 to 6 +move 1 from 9 to 3 +move 29 from 7 to 4 +move 10 from 4 to 3 +move 6 from 7 to 5 +move 1 from 6 to 5 +move 1 from 9 to 7 +move 1 from 7 to 2 +move 4 from 3 to 2 +move 1 from 2 to 9 +move 1 from 8 to 5 +move 11 from 3 to 4 +move 24 from 4 to 7 +move 2 from 2 to 5 +move 10 from 3 to 2 +move 6 from 2 to 1 +move 5 from 4 to 7 +move 1 from 9 to 2 +move 3 from 5 to 1 +move 1 from 4 to 6 +move 4 from 2 to 3 +move 5 from 5 to 7 +move 2 from 5 to 3 +move 32 from 7 to 5 +move 16 from 5 to 1 +move 1 from 1 to 2 +move 3 from 2 to 9 +move 1 from 8 to 6 +move 3 from 7 to 6 +move 1 from 2 to 4 +move 5 from 6 to 8 +move 5 from 8 to 6 +move 2 from 9 to 3 +move 1 from 7 to 5 +move 9 from 5 to 4 +move 1 from 9 to 1 +move 2 from 3 to 1 +move 4 from 3 to 6 +move 1 from 3 to 8 +move 6 from 4 to 6 +move 6 from 5 to 9 +move 1 from 9 to 6 +move 1 from 5 to 1 +move 1 from 5 to 4 +move 1 from 3 to 6 +move 1 from 8 to 3 +move 1 from 4 to 2 +move 1 from 2 to 3 +move 17 from 6 to 4 +move 4 from 1 to 8 +move 3 from 9 to 6 +move 1 from 8 to 4 +move 1 from 9 to 7 +move 2 from 6 to 2 +move 1 from 7 to 8 +move 12 from 1 to 9 +move 8 from 9 to 2 +move 1 from 6 to 9 +move 6 from 2 to 8 +move 2 from 8 to 3 +move 18 from 4 to 9 +move 2 from 1 to 6 +move 1 from 6 to 5 +move 3 from 4 to 3 +move 7 from 3 to 8 +move 4 from 2 to 7 +move 1 from 4 to 6 +move 2 from 6 to 4 +move 13 from 9 to 6 +move 1 from 5 to 2 +move 5 from 9 to 3 +move 9 from 1 to 2 +move 1 from 1 to 8 +move 1 from 2 to 6 +move 3 from 7 to 6 +move 2 from 2 to 6 +move 9 from 8 to 6 +move 1 from 7 to 8 +move 1 from 8 to 7 +move 2 from 4 to 6 +move 5 from 3 to 6 +move 17 from 6 to 9 +move 7 from 8 to 4 +move 4 from 2 to 3 +move 17 from 6 to 2 +move 1 from 6 to 4 +move 1 from 7 to 8 +move 1 from 8 to 9 +move 24 from 9 to 6 +move 4 from 3 to 1 +move 1 from 1 to 5 +move 20 from 6 to 4 +move 4 from 6 to 9 +move 1 from 5 to 7 +move 2 from 4 to 2 +move 1 from 9 to 7 +move 25 from 4 to 3 +move 1 from 4 to 2 +move 2 from 1 to 6 +move 3 from 9 to 4 +move 2 from 4 to 7 +move 2 from 7 to 5 +move 1 from 4 to 2 +move 1 from 6 to 3 +move 1 from 1 to 5 +move 5 from 3 to 9 +move 1 from 5 to 6 +move 10 from 2 to 8 +move 9 from 2 to 5 +move 21 from 3 to 6 +move 1 from 7 to 6 +move 2 from 6 to 5 +move 5 from 9 to 7 +move 6 from 7 to 8 +move 19 from 6 to 9 +move 1 from 6 to 1 +move 8 from 8 to 1 +move 1 from 6 to 1 +move 2 from 8 to 5 +move 5 from 9 to 2 +move 6 from 8 to 2 +move 2 from 9 to 7 +move 9 from 9 to 4 +move 7 from 2 to 4 +move 1 from 6 to 4 +move 14 from 5 to 9 +move 1 from 1 to 8 +move 1 from 7 to 9 +move 4 from 2 to 9 +move 16 from 4 to 6 +move 3 from 2 to 8 +move 1 from 6 to 2 +move 2 from 8 to 9 +move 1 from 8 to 7 +move 1 from 8 to 3 +move 3 from 2 to 7 +move 1 from 3 to 9 +move 8 from 9 to 3 +move 4 from 7 to 8 +move 1 from 5 to 4 +move 4 from 6 to 3 +move 1 from 4 to 2 +move 9 from 3 to 8 +move 10 from 9 to 5 +move 8 from 6 to 7 +move 13 from 8 to 4 +move 8 from 5 to 2 +move 3 from 6 to 3 +move 7 from 9 to 6 +move 7 from 7 to 2 +move 2 from 4 to 6 +move 5 from 6 to 2 +move 3 from 1 to 5 +move 5 from 5 to 8 +move 4 from 6 to 2 +move 4 from 1 to 8 +move 15 from 2 to 6 +move 11 from 4 to 9 +move 12 from 6 to 8 +move 1 from 6 to 9 +move 5 from 3 to 7 +move 2 from 2 to 6 +move 6 from 7 to 1 +move 3 from 1 to 3 +move 1 from 4 to 1 +move 1 from 3 to 9 +move 1 from 3 to 9 +move 1 from 7 to 6 +move 1 from 3 to 2 +move 4 from 2 to 6 +move 4 from 2 to 7 +move 1 from 2 to 6 +move 4 from 1 to 6 +move 12 from 6 to 7 +move 2 from 6 to 1 +move 8 from 9 to 6 +move 1 from 7 to 4 +move 14 from 8 to 1 +move 8 from 1 to 5 +move 1 from 3 to 9 +move 5 from 9 to 5 +move 1 from 8 to 9 +move 1 from 9 to 2 +move 1 from 9 to 3 +move 5 from 8 to 3 +move 12 from 5 to 4 +move 1 from 9 to 2 +move 6 from 7 to 3 +move 7 from 3 to 2 +move 1 from 5 to 1 +move 1 from 8 to 3 +move 2 from 1 to 3 +move 2 from 6 to 9 +move 5 from 6 to 5 +move 5 from 1 to 7 +move 4 from 4 to 1 +move 7 from 2 to 8 +move 4 from 3 to 8 +move 1 from 9 to 3 +move 1 from 9 to 5 +move 4 from 1 to 8 +move 10 from 7 to 9 +move 1 from 6 to 7 +move 2 from 8 to 6 +move 6 from 4 to 2 +move 5 from 3 to 1 +move 2 from 6 to 3 +move 2 from 7 to 1 +move 5 from 2 to 5 +move 2 from 7 to 1 +move 7 from 5 to 7 +move 2 from 5 to 6 +move 2 from 5 to 3 +move 3 from 2 to 9 +move 9 from 9 to 3 +move 1 from 6 to 4 +move 3 from 3 to 1 +move 9 from 8 to 2 +move 6 from 3 to 6 +move 8 from 7 to 9 +move 4 from 9 to 8 +move 14 from 1 to 5 +move 1 from 9 to 2 +move 1 from 1 to 5 +move 2 from 3 to 6 +move 12 from 5 to 3 +move 2 from 2 to 8 +move 7 from 6 to 2 +move 12 from 2 to 8 +move 2 from 6 to 2 +move 6 from 9 to 6 +move 1 from 1 to 2 +move 1 from 9 to 3 +move 2 from 5 to 9 +move 1 from 9 to 2 +move 1 from 9 to 4 +move 1 from 3 to 2 +move 2 from 6 to 7 +move 2 from 6 to 9 +move 5 from 4 to 2 +move 14 from 3 to 9 +move 15 from 9 to 4 +move 1 from 7 to 4 +move 10 from 8 to 6 +move 1 from 5 to 9 +move 2 from 9 to 5 +move 10 from 8 to 1 +move 1 from 7 to 4 +move 5 from 1 to 2 +move 2 from 1 to 5 +move 3 from 4 to 6 +move 4 from 5 to 8 +move 5 from 8 to 6 +move 14 from 2 to 9 +move 2 from 6 to 7 +move 3 from 2 to 9 +move 3 from 1 to 7 +move 1 from 7 to 3 +move 3 from 7 to 1 +move 1 from 3 to 6 +move 1 from 7 to 6 +move 1 from 8 to 9 +move 2 from 1 to 4 +move 1 from 1 to 2 +move 16 from 9 to 4 +move 7 from 4 to 8 +move 5 from 8 to 1 +move 2 from 8 to 3 +move 2 from 1 to 7 +move 13 from 6 to 7 +move 2 from 2 to 3 +move 4 from 7 to 4 +move 6 from 4 to 5 +move 4 from 7 to 6 +move 3 from 1 to 2 +move 2 from 2 to 6 +move 3 from 3 to 8 +move 5 from 5 to 3 +move 2 from 9 to 6 +move 3 from 3 to 7 +move 1 from 8 to 1 +move 22 from 4 to 8 +move 1 from 4 to 3 +move 9 from 6 to 3 +move 1 from 2 to 1 +move 4 from 3 to 4 +move 2 from 4 to 5 +move 1 from 1 to 7 +move 4 from 3 to 7 +move 2 from 6 to 1 +move 1 from 6 to 7 +move 18 from 8 to 7 +move 2 from 6 to 5 +move 2 from 3 to 4 +move 1 from 5 to 4 +move 30 from 7 to 6 +move 2 from 1 to 3 +move 18 from 6 to 8 +move 12 from 6 to 4 +move 13 from 4 to 9 +move 2 from 3 to 8 +move 1 from 6 to 2 +move 3 from 7 to 2 +move 1 from 1 to 2 +move 2 from 5 to 9 +move 8 from 8 to 1 +move 1 from 7 to 8 +move 7 from 1 to 3 +move 2 from 4 to 9 +move 1 from 1 to 6 +move 4 from 2 to 1 +move 16 from 8 to 1 +move 1 from 2 to 6 +move 2 from 4 to 8 +move 2 from 5 to 1 +move 4 from 3 to 7 +move 3 from 7 to 1 +move 1 from 6 to 8 +move 1 from 8 to 9 +move 1 from 7 to 3 +move 6 from 3 to 5 +move 1 from 3 to 8 +move 1 from 6 to 9 +move 16 from 9 to 5 +move 4 from 5 to 3 +move 15 from 5 to 1 +move 1 from 5 to 8 +move 3 from 9 to 8 +move 9 from 8 to 5 +move 6 from 5 to 1 +move 4 from 5 to 6 +move 2 from 6 to 4 +move 1 from 6 to 4 +move 1 from 8 to 4 +move 3 from 3 to 6 +move 3 from 6 to 8 +move 1 from 6 to 8 +move 21 from 1 to 9 +move 4 from 8 to 5 +move 3 from 5 to 7 +move 2 from 5 to 1 +move 2 from 4 to 8 +move 2 from 8 to 2 +move 2 from 7 to 8 +move 1 from 7 to 9 +move 1 from 8 to 7 +move 5 from 1 to 8 +move 1 from 7 to 8 +move 4 from 8 to 4 +move 2 from 4 to 5 +move 1 from 2 to 7 +move 1 from 2 to 7 +move 2 from 7 to 6 +move 2 from 6 to 9 +move 1 from 4 to 9 +move 1 from 3 to 4 +move 16 from 1 to 5 +move 16 from 5 to 7 +move 2 from 5 to 4 +move 14 from 9 to 6 +move 5 from 4 to 3 +move 3 from 3 to 6 +move 5 from 1 to 4 +move 2 from 4 to 7 +move 7 from 9 to 4 +move 2 from 9 to 7 +move 10 from 6 to 9 +move 8 from 4 to 6 +move 1 from 8 to 4 +move 1 from 1 to 9 +move 14 from 6 to 3 +move 10 from 3 to 2 +move 3 from 7 to 8 +move 6 from 3 to 1 +move 2 from 7 to 9 +move 5 from 7 to 9 +move 10 from 9 to 1 +move 2 from 4 to 3 +move 1 from 2 to 1 +move 16 from 1 to 4 +move 1 from 6 to 1 +move 2 from 3 to 9 +move 3 from 8 to 5 +move 8 from 7 to 1 +move 3 from 5 to 9 +move 7 from 4 to 6 +move 7 from 1 to 5 +move 2 from 8 to 3 +move 1 from 7 to 8 diff --git a/src/Year_2022/files/P6.txt b/src/Year_2022/files/P6.txt new file mode 100644 index 0000000..13a015a --- /dev/null +++ b/src/Year_2022/files/P6.txt @@ -0,0 +1 @@ +stftmtvvtvqqczqqnjnwwlqqdzdnnsvnsswbbwsstvvssfjsjbjfjmjpjzpplpppjzjqqdzzhqqqqtcccbzzzwzrrrdqdldpdsppmqmmnwwjddnqqscclncllvhllqpllchhbccfcbcgbcgcfcncsnstsddldzldlmljjfbjbzbccmrmrppqmqsswbwqwdwwcnwwhrhppfsfvsvrrfllhglhlggjpggzjgzggnvvqfvvhffpwpmwpmmwvmvrmrbmbzmzbbvgbbcfbcfbfppnzpzrrszzqgzgjgddmdwmwrmwmzznqzqhqhvvsslppsrrljjfpfcpfpbbrjjwjmjpmpfmfzfvzfftptzzbmzmddpvdddqmmzjzbbhmmwqmmmbgmmttrhrqrvqvzvdvzdvvmsvmmqlmmtddvlvttrtvtvcttvssnwwbccqmmgbbqrqlqjllmslsmslltrtffzfpfzpffvwvffsllgvgtgwtwnttfzznzqzztfzfvzznnwzzcvcqvvdwwsnsvnnthhnphpssmjmfmhfmhmgmllmsmrsrrmmhsswjwqqdbbghhpsptsswvsvfvcffqcchlhfhvhjhdjhddvjjpmmsrsqrrngrrmvmsvsllrmlrlprpggqzqmmvlvvwrwnrwwzztrzrbrdbrdbbhlhchjchhtthpthphplhhlphpjjsddtppvbpbbmnmgnmmqbbrhhfrfpfjpjgjljcctwtmwtwvvvmsvmmnjmnjmnmqmvvggtzzctzttszsvvjwjqjmjbjvbbshbhghlghhpvpnvvqmmgjmmggqvqtvqtvqtvvmlljbbhdhshnnwqwbbrnnwswmwfmfttjztjzjsjzjdjbdjjzfzdzgzhghgpgqqdzdhhnwnjnnhrnrqqjsqsllbzzzcnzzmjmvmrvrgrfgrrqmrmpmpzmzqqfwqfwfjjhphgpptzzwmmfjjvbjvbbqsbsbcbppjzpjjzpjpvjjzdjjgcgppvrvjrjpjspjppntpnnjlnlrnrdndjnnsbnnppvspprbrddjrdrmrfmmtmtbtntftjjsscvcbvvcnccnbnrbbmlmddhpdptddmrmmjddnjjtztctqqhhttqctqtbbnfnwnmndnzzljlgltgltljtjllwjjbrjbrbpbgppmzpmpggdnnmznnhhmfhhssgtgvvlsljltlppdqqbtbvbsvsswbsbhsbsmmwswbbbbhvbvcbvvsvcsvvmfmlmgmjgmmbqbrbsrrgrsggldlmlttpbpmmtptctqcqvccnhnmnssmvsmmddlclpccfwfdfqfvqfvfqqwmmwrmmbzznpnllfttgcttnbtnnsswttfppnddpdpsphhpttnrtrlrsrmrnmmzhmhnmnwwddmhdhqqhbqqdcclnlfnnzfnzzqfqddczcqcrrjsrrswslltfltffjhhqqfcchqcqpplbltbblbcbncnpccdffcwwqzwqqlwwtjjpbbjvvljvjgvvrsszfsfcssqsvvwsvvdfvdfdpffztzrtzthzhhmwmzwzssjlsldsldsldlvvjdvvnbvnvmvmccvfcvcfcbchhzqqhgqqcbbhdbdpddwcdwwzszsfszzgbgdgzgvgsgnssfqsqjssrppsgppmmpzmppglgqlqqpzpqqfzzzrnzrnrqqzzfwzzffjfzzmnznpznpprhhvcvvvfddcrdrsscnnsznzszbznntwntnrnbnzzrnnlwlggnzzwppmbmrrncnlclzltlblhhlvhvphhsdhsdsqddgzgvvshvvzzbvbrrlplqpptplljcljlvjlvlqvvndnsdddmvddzhzjjgpjpddppzllwtwfwgfgpffmhhzllsttmqqhjhhpvpgpfjsgscnwjmwmtmptwlpfjljwgpgntrlpjfgbjqmcpzgfhrwmznqnsbpptbdrzmdtvvtdqjgrjzlphndhmlchvddglqnqsjqrfqslprsvlqjwqnsmsznptsstpvdntpttslpmqqbsdlqwpjqnzmpblgqmjrvqwsncnzdszgfsghddlnwhwzpgtddgstttvrjfjwwfrgsdjjngljqlqcrzlgsmwngbzvmjwtnqdqcgwmfhsztgrtvvfzbtstmdbqpntdpsszjthqvpbdwswfzvmrcpbgbgdmldfhvdpfsmdzfhwsrpcglsztdwqgbqszcqtqjhgntzvttldqsffftzmllptzhmhpmfsgcchfrnrchnsgcfjbgrqmvrmmhnmlnwtgwhznqfgwnlrqlpjrvfrgzcjwncvlwhpclfzngbgvmrmlzngmqlvvwhbpjzlclgrcnnvnlppqhvlrnpzvmtsbdpfbwgffgzfwvltcfvfdcnfhwvcvclwwbmshhmpgrzgltwjmqczpqzdwfjpqhmwqhvvgnpgtwrjrgwvhthtdrdpnwpbmwstgblwmbfvlwflqmfbcsgwstwvncwfcsmrpcfrrvmlbqhdtdswswfnzhgzlngwsrtlzfcgdppmjnghfrgbdqhqmslhcqddjvsslsjwqqznttqjzdlghnsvqqtwrpfbzjgwnrhhvlnbqmnvcpblzgbzltnrhzpdwvbqbtmctbzgsdjfzswrbqbzgvwjlwtmgcllnmnwcljbhbplpvtgpgjftfrbgpgmhghnjcgjfqmsbqhbgtzbfzgwmfdsgfgmgzsbgdrszfhjttbvcqjzjgbqfgswlmrrhnmnfrptvjtlnvplgznsljzfzmhghlsccnqzflfnmbhshfprhclmtfptcmtnhrjgnngnqnczvcgzzlntftjsbgpgwzbnrhzzfqmznqnzfrvjzsmtpjbswzjlbgpfftzrzbfgdblpwscbqjfrfmfnhhlhjprtlzzvwnwzsnqhnmgwsdprnrblgbclzhthftqzdljspwdzwmwhfmdzmlvqsngppdfsjdprbrhffcvcvzztjjqcffwbrvpzvzfzhjvsfvsnrmjvqmjtrjbmbqsdtjgvtbbzzfmnmrrflgcdtljpmpvqvdbzgbmhjgccgdtplllctzqpfqnsztbwdbmqgfzrcddtmwrgmwsghcfpgqssdjrtqhtjfbpjvjdnzgvpzrhbrhrhcmpbglbbrvdltdpsrwjbjzftccwgnqmnlqlpjwrfdvmlgvgqznlvsmpzsmgjstvqbqpprzlsdndpfbmqcrfgvcfvlfhmpfnnqlcqlnbbgcrrrhbtzwnwmfrnrzvgmqlmqnmnzbwflwzcmncphjqztlrzvpztqhptmfsrppvvlzcfnlrwptgccsjjjscjcwnzssmbcvtzhnscgsbrchbqbrtdzllfvmqfwznfzpzmbfwcdsfhdlddnfbdgqbqjqzdtppshwcvvcjqstdgtgbhmlqlrfrhbvfsszsmbldmwfnfgnjptdslnzwcjgmvbnqcfzjmrslrlllplbhpjcnvzmvrfzwqhmbnrvpqnvcfncgfwqlvcwpwwljssfmswctcmhgtphvjdpfnnzznfbdjcsndrczlgdjhrnrltsgbtqmqcbwlthwcgsbvqbnntcznczpmlmblwdrlmzqdztwsgjthjwtfcpgwbczmdmhttzcwvdzhdfldmwnbnfdcjgvjhrfltjnjhqhzmzrlbncwdnlgshmqhpgsdwbvmvjsfgvgqzqjqdzqzmfmrncfdgrqfrnstvpqwtltnhgrmhgmmnwvlnsfmmbjrdmrnlgfgpqncdpqgvjltpghbgffdppdcfhdqhtvrdnfvcttlrqppfnqtmzpfgsnmjqfrgtbbdzzrccsrzgfjndlrnzqmjjtgldglcpzcrhwfplvdndjtzbpfbbbpfljqnlvrdzbrvczzwdrvzlmslbjsqgqdrltmhwcdpldqldlpctcbjmsvdwlfspzlpgrhdrvjtprcwrmszvzwmmjgvsbfcztmrdgrgshgtggpzszgqhwmhdzjmzsgqsfmqvcgqqwgprgvvqlbfhpwsfbjdqtcfnfhsgzthzhbpwggbnscqbnvcdprsbgllsrdcclqggfgfdrpqlqljfwpmzdhthpczcsqrrm diff --git a/src/Year_2022/files/P7.txt b/src/Year_2022/files/P7.txt new file mode 100644 index 0000000..c988c21 --- /dev/null +++ b/src/Year_2022/files/P7.txt @@ -0,0 +1,1013 @@ +$ cd / +$ ls +dir jmtrrrp +dir jssnn +dir lbrmb +11968 pcccp +$ cd jmtrrrp +$ ls +77968 chq.jvb +dir fmgsql +$ cd fmgsql +$ ls +dir dbnsfp +dir vvp +$ cd dbnsfp +$ ls +51021 crlq.lrj +186829 dhcrzvbr.wmn +16232 fvhn.fqm +54150 qpbqqj.rpg +$ cd .. +$ cd vvp +$ ls +179105 rrcsndz.tzp +$ cd .. +$ cd .. +$ cd .. +$ cd jssnn +$ ls +dir bphfqs +dir dbnsfp +dir pcccp +dir snr +dir zjbvwsnv +$ cd bphfqs +$ ls +110077 dhcrzvbr.wmn +$ cd .. +$ cd dbnsfp +$ ls +dir hgvh +dir jtqdcmsz +154197 rrcsndz.tzp +$ cd hgvh +$ ls +dir qjnbg +$ cd qjnbg +$ ls +dir bqzfpr +$ cd bqzfpr +$ ls +124394 wjsbsp +$ cd .. +$ cd .. +$ cd .. +$ cd jtqdcmsz +$ ls +275597 dbnsfp.fpg +$ cd .. +$ cd .. +$ cd pcccp +$ ls +dir cnbd +85621 cqzvwl +dir dbnsfp +114355 hbhp.cfv +dir mcgq +dir pcccp +dir qpbqqj +224038 rrcsndz.tzp +dir zcsm +27570 zjbvwsnv.fjt +$ cd cnbd +$ ls +dir jrbz +dir pphv +$ cd jrbz +$ ls +dir dwvlwfq +$ cd dwvlwfq +$ ls +32237 fwclr.rnb +$ cd .. +$ cd .. +$ cd pphv +$ ls +180370 dhcrzvbr.wmn +50154 dzvwdwl.gbt +123965 mlsv.hlw +163116 wnhtwr.mwl +$ cd .. +$ cd .. +$ cd dbnsfp +$ ls +252181 btv.mpv +dir hwncj +dir pcccp +$ cd hwncj +$ ls +51410 jbd.fcm +$ cd .. +$ cd pcccp +$ ls +258123 chq.jvb +$ cd .. +$ cd .. +$ cd mcgq +$ ls +206506 qpbqqj.bbb +$ cd .. +$ cd pcccp +$ ls +193219 ddhtnql.hmb +134114 hjbpzqzb.rwn +108927 lznndn.nqd +73241 ncdrv +$ cd .. +$ cd qpbqqj +$ ls +dir crdt +dir tgchdnc +$ cd crdt +$ ls +205710 chq.jvb +$ cd .. +$ cd tgchdnc +$ ls +dir bdw +dir dpl +dir jssnn +dir pcccp +dir plpzbm +$ cd bdw +$ ls +211300 dbnsfp.tjm +$ cd .. +$ cd dpl +$ ls +287744 rsbjqwm +$ cd .. +$ cd jssnn +$ ls +dir jssnn +$ cd jssnn +$ ls +9644 hmjhshg.vbv +$ cd .. +$ cd .. +$ cd pcccp +$ ls +dir jssnn +85888 pcccp.hdj +dir qpbqqj +dir rmscmwtv +$ cd jssnn +$ ls +129698 crlq.lrj +7499 dhcrzvbr.wmn +283607 qpbqqj.djr +234874 wqnrhll +$ cd .. +$ cd qpbqqj +$ ls +184229 qqpb.ftd +$ cd .. +$ cd rmscmwtv +$ ls +188048 dhcrzvbr.wmn +dir jwtpgbnt +$ cd jwtpgbnt +$ ls +209946 hgg +$ cd .. +$ cd .. +$ cd .. +$ cd plpzbm +$ ls +32627 tlb.qmc +$ cd .. +$ cd .. +$ cd .. +$ cd zcsm +$ ls +dir lczflft +dir zjbvwsnv +dir zmh +$ cd lczflft +$ ls +40043 dzgnvlw.scr +dir lrnb +$ cd lrnb +$ ls +109881 bjpbs +dir jssnn +46901 npmw +$ cd jssnn +$ ls +9216 sgrp +$ cd .. +$ cd .. +$ cd .. +$ cd zjbvwsnv +$ ls +214676 jssnn.hgn +$ cd .. +$ cd zmh +$ ls +dir jdt +dir rggpltr +$ cd jdt +$ ls +147387 jhhsv +90052 jssnn.wns +53105 qpbqqj.dzq +$ cd .. +$ cd rggpltr +$ ls +121454 dbnsfp.dzt +dir gcc +$ cd gcc +$ ls +dir zbqwl +dir zjbvwsnv +$ cd zbqwl +$ ls +260297 pcccp.jrw +$ cd .. +$ cd zjbvwsnv +$ ls +248709 pcccp.tph +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd snr +$ ls +152569 chq.jvb +1437 crlq.lrj +$ cd .. +$ cd zjbvwsnv +$ ls +dir cqhb +53235 ghhtl.bhv +199640 npcfdw +136346 qpbqqj.lmv +dir zjbvwsnv +$ cd cqhb +$ ls +24712 sqqf +$ cd .. +$ cd zjbvwsnv +$ ls +dir gzqg +dir hfbfvn +dir srsphr +dir vgvdcvc +$ cd gzqg +$ ls +dir jjw +$ cd jjw +$ ls +240052 zdcjjz.pmg +$ cd .. +$ cd .. +$ cd hfbfvn +$ ls +278190 bfgndw.pvf +$ cd .. +$ cd srsphr +$ ls +42591 zjbvwsnv.hgh +$ cd .. +$ cd vgvdcvc +$ ls +120322 rrcsndz.tzp +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd lbrmb +$ ls +dir bjhpdj +42241 crlq.lrj +dir dbnsfp +244610 dhcrzvbr.wmn +dir hppb +dir mcnzs +dir npntsr +13625 tpjpcsgp.dlz +219424 vvpbt.zvf +dir zjbvwsnv +191467 zjbvwsnv.htn +$ cd bjhpdj +$ ls +dir bqjvst +204722 dbnsfp +dir dhltrqqq +226082 dmdqcjp +dir fcqwgzp +dir jssnn +6453 jssnn.ndh +23799 jssnn.zqn +dir nwglfhpl +dir pcccp +dir pdnj +269246 shzqns.nws +dir sjstqlcb +dir zssln +$ cd bqjvst +$ ls +202793 dbnsfp.pjj +259783 jssnn +dir rbvbhnvs +30683 rvddnjmb.tlz +dir tzhslnv +$ cd rbvbhnvs +$ ls +86934 vrtrf.htt +$ cd .. +$ cd tzhslnv +$ ls +76278 mghcwdlr.tsc +$ cd .. +$ cd .. +$ cd dhltrqqq +$ ls +dir mfd +dir pcccp +dir smmb +251164 wsdnsgtt.lhr +191876 zvr.bbz +$ cd mfd +$ ls +51017 crlq.lrj +99213 rjtbnnnq.hgd +$ cd .. +$ cd pcccp +$ ls +160487 dhcrzvbr.wmn +dir nhdrnthj +dir qpbqqj +$ cd nhdrnthj +$ ls +181291 bbn.wtm +186551 fnw.tnn +23622 rrcsndz.tzp +dir zjbvwsnv +$ cd zjbvwsnv +$ ls +227547 dhcrzvbr.wmn +$ cd .. +$ cd .. +$ cd qpbqqj +$ ls +212353 crlq.lrj +170195 dhcrzvbr.wmn +dir ttvp +$ cd ttvp +$ ls +185994 tgjcfgjv +$ cd .. +$ cd .. +$ cd .. +$ cd smmb +$ ls +dir dbnsfp +85354 dbnsfp.zpn +80665 dfmmjbm.rnr +135989 dhcrzvbr.wmn +93718 lrbzr.nfs +dir mjpfnfns +dir nsdpfnhb +dir pmnssvd +32270 qpbqqj.vtd +$ cd dbnsfp +$ ls +31796 gzs.rgv +64506 vbjncw.bpz +181659 vjlfrdp.tqh +$ cd .. +$ cd mjpfnfns +$ ls +231611 chq.jvb +17518 cmnlrzq.hvh +144795 dbnsfp +162194 jssnn.wjz +29305 vdqnlw.fzf +$ cd .. +$ cd nsdpfnhb +$ ls +281844 chq.jvb +$ cd .. +$ cd pmnssvd +$ ls +165816 dfvl.czb +144561 gbn +150785 lnzdwrmb +111214 rrcsndz.tzp +164156 tzgdb.hht +$ cd .. +$ cd .. +$ cd .. +$ cd fcqwgzp +$ ls +199161 dhcrzvbr.wmn +34251 rrcsndz.tzp +198345 vjlfrdp.tqh +167001 zjbvwsnv.bsd +$ cd .. +$ cd jssnn +$ ls +dir ccblfvl +103180 dhcrzvbr.wmn +dir prw +dir tzqfn +dir zjbvwsnv +166467 zjbvwsnv.tdt +$ cd ccblfvl +$ ls +159752 crlq.lrj +20805 jssnn.dvb +243040 lct.zll +27492 qbh +27174 vjlfrdp.tqh +dir zvfwq +$ cd zvfwq +$ ls +135126 chq.jvb +41664 gphw.vzd +dir hmrdghbr +dir jssnn +dir qzzb +dir tmdlcv +$ cd hmrdghbr +$ ls +dir jvgpwrbs +$ cd jvgpwrbs +$ ls +dir wzdv +$ cd wzdv +$ ls +26834 qpbqqj.njf +$ cd .. +$ cd .. +$ cd .. +$ cd jssnn +$ ls +90199 jqqmqddf.qnz +$ cd .. +$ cd qzzb +$ ls +dir mgpql +dir src +dir zvdgc +$ cd mgpql +$ ls +141852 qpbqqj +$ cd .. +$ cd src +$ ls +204425 lqmcbndm.jrj +75571 qsbrsv.jcm +$ cd .. +$ cd zvdgc +$ ls +268742 ffjmrmmz.lhg +18385 rvmp.hjv +$ cd .. +$ cd .. +$ cd tmdlcv +$ ls +182587 sfwvjrj.mzl +$ cd .. +$ cd .. +$ cd .. +$ cd prw +$ ls +207429 dbnsfp.rqf +dir ptgn +dir pzgpqp +252902 rbt +169694 trg.rsh +$ cd ptgn +$ ls +dir jssnn +dir qpbqqj +dir rpd +$ cd jssnn +$ ls +189316 dbnsfp.bqc +$ cd .. +$ cd qpbqqj +$ ls +167937 zjbvwsnv.bhz +$ cd .. +$ cd rpd +$ ls +8775 crlq.lrj +$ cd .. +$ cd .. +$ cd pzgpqp +$ ls +dir pcccp +$ cd pcccp +$ ls +51496 pcccp +$ cd .. +$ cd .. +$ cd .. +$ cd tzqfn +$ ls +dir cbpfvdp +285700 crlq.lrj +7426 dbnsfp.fsd +dir gdl +141367 jssnn.hmw +184482 sczphnp.vnc +126288 vjlfrdp.tqh +dir wndpdj +$ cd cbpfvdp +$ ls +dir cvfr +dir qpbqqj +$ cd cvfr +$ ls +dir jfrnvts +dir qpbqqj +$ cd jfrnvts +$ ls +dir vwdn +$ cd vwdn +$ ls +236936 vjlfrdp.tqh +$ cd .. +$ cd .. +$ cd qpbqqj +$ ls +254275 bqd +$ cd .. +$ cd .. +$ cd qpbqqj +$ ls +dir jssnn +201960 qpbqqj +$ cd jssnn +$ ls +131127 jssnn +$ cd .. +$ cd .. +$ cd .. +$ cd gdl +$ ls +225146 hsgzmtp.wcs +204436 jssnn.lhh +64007 mjzjgfg.jsb +$ cd .. +$ cd wndpdj +$ ls +245412 bvcq +211386 dbnsfp.tqd +186962 fql.mww +dir hlmhtfz +117446 smvjvcn.lcp +$ cd hlmhtfz +$ ls +150152 lrdhbq.rvm +$ cd .. +$ cd .. +$ cd .. +$ cd zjbvwsnv +$ ls +179703 fvmbz +87552 qtz.ccw +129764 rrcsndz.tzp +$ cd .. +$ cd .. +$ cd nwglfhpl +$ ls +66039 crlq.lrj +dir cwq +dir dlgrsw +267814 frhlttn.nmd +dir hmprt +dir qpbqqj +dir wnfzznfh +$ cd cwq +$ ls +77655 cpjnwzh +dir pcccp +dir zjbvwsnv +dir zzhjfmnr +$ cd pcccp +$ ls +dir pcccp +$ cd pcccp +$ ls +245309 bggzbrg.flf +$ cd .. +$ cd .. +$ cd zjbvwsnv +$ ls +196915 gnmfb.dzq +dir ngqbdqp +$ cd ngqbdqp +$ ls +355 rrcsndz.tzp +$ cd .. +$ cd .. +$ cd zzhjfmnr +$ ls +dir dbnsfp +$ cd dbnsfp +$ ls +223184 chq.jvb +$ cd .. +$ cd .. +$ cd .. +$ cd dlgrsw +$ ls +181906 chq.jvb +5636 dbnsfp +219889 jbr.slc +dir zrntbl +$ cd zrntbl +$ ls +61864 brnpgpwt +138980 qpbqqj +$ cd .. +$ cd .. +$ cd hmprt +$ ls +90249 dbnsfp.mbd +$ cd .. +$ cd qpbqqj +$ ls +290377 crlq.lrj +$ cd .. +$ cd wnfzznfh +$ ls +83022 hclmps +64095 zhm +$ cd .. +$ cd .. +$ cd pcccp +$ ls +dir rdzntr +dir rvccq +$ cd rdzntr +$ ls +239028 rrcsndz.tzp +$ cd .. +$ cd rvccq +$ ls +22746 chq.jvb +288752 jjvppq.swt +dir msgwsnjq +dir pggz +228469 vjlfrdp.tqh +$ cd msgwsnjq +$ ls +102522 lwgqc.mhv +25239 ndm.llf +$ cd .. +$ cd pggz +$ ls +dir cnjqsqj +$ cd cnjqsqj +$ ls +229407 shpnq +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd pdnj +$ ls +193069 rwnhgttz.pvp +$ cd .. +$ cd sjstqlcb +$ ls +263295 chq.jvb +224091 jss.wtr +$ cd .. +$ cd zssln +$ ls +5859 ncdlcr.dll +$ cd .. +$ cd .. +$ cd dbnsfp +$ ls +271252 dhcrzvbr.wmn +$ cd .. +$ cd hppb +$ ls +259968 jssnn +81292 qpqqb.clj +$ cd .. +$ cd mcnzs +$ ls +170903 crlq.lrj +59482 dhcrzvbr.wmn +dir dqzwzbgm +dir gnrztn +286736 jssnn.jcm +32791 phqsgl +dir pzjnrwt +197323 vjlfrdp.tqh +dir wvnwbpct +$ cd dqzwzbgm +$ ls +78575 qpbqqj +251546 qpbqqj.slb +$ cd .. +$ cd gnrztn +$ ls +158603 hdnwmd.rhj +dir nbfdtwzr +178239 ptnchzpg +40517 rrcsndz.tzp +dir smvb +198007 vjlfrdp.tqh +$ cd nbfdtwzr +$ ls +200354 crlq.lrj +$ cd .. +$ cd smvb +$ ls +163921 zjbvwsnv.brz +$ cd .. +$ cd .. +$ cd pzjnrwt +$ ls +33891 lwrll +259646 pcccp.sfn +106835 pqfzthjq +189673 rrcsndz.tzp +$ cd .. +$ cd wvnwbpct +$ ls +234188 dhcrzvbr.wmn +dir gmtpsgv +86379 jssnn +146663 sfpmdbbd.jvt +25795 vjlfrdp.tqh +$ cd gmtpsgv +$ ls +18642 chq.jvb +3046 cznlwtw +26335 ddgpngrc +116455 vnnls.hsg +$ cd .. +$ cd .. +$ cd .. +$ cd npntsr +$ ls +dir cccjdcvb +206657 chq.jvb +280518 crlq.lrj +dir dbnsfp +dir jphnn +dir jssnn +dir mpl +195193 rrcsndz.tzp +dir rztc +dir znwp +$ cd cccjdcvb +$ ls +192965 mcr.sfq +$ cd .. +$ cd dbnsfp +$ ls +dir gfns +173317 jssnn.tjq +dir mgr +68817 mvwcwfcr.zmz +dir pqfht +108571 swfl.dtj +10398 tvvvv +dir vzg +174361 zjbvwsnv +$ cd gfns +$ ls +203999 zjbvwsnv.hfg +$ cd .. +$ cd mgr +$ ls +dir zjbvwsnv +$ cd zjbvwsnv +$ ls +26871 tqlgcf.jrn +$ cd .. +$ cd .. +$ cd pqfht +$ ls +199590 clpvscl.rlm +dir dwlhv +dir vhzfzhrb +$ cd dwlhv +$ ls +130761 qpbqqj +242752 rrcsndz.tzp +$ cd .. +$ cd vhzfzhrb +$ ls +dir njdgcbvm +$ cd njdgcbvm +$ ls +dir snjfqg +$ cd snjfqg +$ ls +dir qpwh +$ cd qpwh +$ ls +153353 qsjpj +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd vzg +$ ls +dir pcccp +$ cd pcccp +$ ls +dir jfbtl +$ cd jfbtl +$ ls +209199 dbnsfp +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd jphnn +$ ls +52305 crlq.lrj +193480 gmms.whz +59354 nmq.dww +64638 qpbqqj +47072 rrcsndz.tzp +$ cd .. +$ cd jssnn +$ ls +69168 crlq.lrj +1549 dhcrzvbr.wmn +219596 hdmczg.lmm +108063 jssnn +24327 vjlfrdp.tqh +dir zjbvwsnv +$ cd zjbvwsnv +$ ls +189952 chq.jvb +$ cd .. +$ cd .. +$ cd mpl +$ ls +144856 bqrrzm +249487 crlq.lrj +dir ffqgpgfg +93632 flqwtn.nsz +dir mwpcqr +195910 pdqwn.lcg +$ cd ffqgpgfg +$ ls +66459 dbnsfp +200500 lcmt.zmz +207093 qpbqqj +77042 vjlfrdp.tqh +57109 wwzv.hbn +$ cd .. +$ cd mwpcqr +$ ls +dir zjbvwsnv +$ cd zjbvwsnv +$ ls +166393 vjlfrdp.tqh +$ cd .. +$ cd .. +$ cd .. +$ cd rztc +$ ls +57788 chq.jvb +$ cd .. +$ cd znwp +$ ls +164627 chq.jvb +$ cd .. +$ cd .. +$ cd zjbvwsnv +$ ls +dir dgrrl +71529 jssnn +198617 pcccp.qqh +dir phggn +56842 zjbvwsnv.vqd +$ cd dgrrl +$ ls +dir czm +dir fhhlbdlz +dir gstjw +dir qpbqqj +dir stgb +$ cd czm +$ ls +dir jssnn +$ cd jssnn +$ ls +162335 chq.jvb +30099 mfdgdw +96389 pcdsd.wmw +251423 tmz.lcb +205979 vpltdt.gtv +$ cd .. +$ cd .. +$ cd fhhlbdlz +$ ls +dir qpbqqj +dir vdjs +dir zgz +$ cd qpbqqj +$ ls +285561 chq.jvb +263924 lbqcfdrs +138854 pcccp.dtn +$ cd .. +$ cd vdjs +$ ls +32688 chq.jvb +223233 tbn.blt +$ cd .. +$ cd zgz +$ ls +92804 bqltmv.wzb +$ cd .. +$ cd .. +$ cd gstjw +$ ls +151784 fvfszzzn.cbh +$ cd .. +$ cd qpbqqj +$ ls +dir blztqf +dir plgnh +$ cd blztqf +$ ls +195097 wlvmtz +$ cd .. +$ cd plgnh +$ ls +dir dbnsfp +246221 dhcrzvbr.wmn +271121 jhwmmzls.mhw +170162 pcccp.dpp +37872 qpbqqj +$ cd dbnsfp +$ ls +dir dhpnr +$ cd dhpnr +$ ls +152837 pcccp +$ cd .. +$ cd .. +$ cd .. +$ cd .. +$ cd stgb +$ ls +248436 vjlfrdp.tqh +$ cd .. +$ cd .. +$ cd phggn +$ ls +284602 dhcrzvbr.wmn +dir lctr +dir rjmc +66651 rrcsndz.tzp +117525 vth.fgw +156877 wcqnjzbq.dgf +7803 zpsrzclh.bzw +$ cd lctr +$ ls +212339 jssnn.whp +dir jzhcqb +99974 pcccp.zhs +111354 pmc +104899 vjlfrdp.tqh +93496 zhwmbw +$ cd jzhcqb +$ ls +dir zjbvwsnv +$ cd zjbvwsnv +$ ls +146807 rbrg +$ cd .. +$ cd .. +$ cd .. +$ cd rjmc +$ ls +dir fvbmsc +139747 glwmr.lrg +dir gvnnz +102023 tbj.qmz +dir vsztsjfh +$ cd fvbmsc +$ ls +136838 vpvbz.qtw +$ cd .. +$ cd gvnnz +$ ls +95498 zjbvwsnv +$ cd .. +$ cd vsztsjfh +$ ls +215479 ffwlcrwb diff --git a/src/Year_2022/files/P8.txt b/src/Year_2022/files/P8.txt new file mode 100644 index 0000000..115d4da --- /dev/null +++ b/src/Year_2022/files/P8.txt @@ -0,0 +1,99 @@ +121212011303121030310342042402330124244111344151215543452341031241241020400101112013333020112100012 +021211021113201200034023433130134132413414155334115143443355322133444324121312404302011201132211211 +112100131112221303204244242431121003451531135255455445141455432541312201002214304203010313110102221 +020110213013113103013204332232423553543445433222155153431441144442133012114241240204113022033210212 +220211123123023221431120203212535513244235435131233452411353515142141342420233430124211033211103201 +201022331320201202140104411413522115413213345254535252552153334555534422544330002102424023033322310 +002011111302111311312434241323154521232411313453434133354341132333115133343011222312043111232231222 +013200323000441302142430153512351514554144243134335236231323244242514241141543000044010321332222320 +030100102011023442422335322343425254455155645352466333266624622411411531253414114432034034311131222 +322030202043440231214443243242233422366246622362565344565233563555324325333511154331042320111021203 +213003300414441314312513553152343433222235343463444622556454453564615122442121152433110144401122122 +021322211313341320225244345212526464422556233255442242524636654565546141313334241514223301121200020 +200002004321134302434442521521345336526234552642236565226243663554552342241443523255344432431132112 +112123334441323144345534151556562252635233363355224653254253523344642442351332145221300143332241010 +022320131410010151254142156636463345252452625423376754343432433653322245664252425413321040141302232 +213010110022111155333545424663525462442454635436533755536636426266424643655512213435531304111222000 +130321001200011144555214565543554643256537345337535434444635673532262633225653144544344432301332432 +022001420212325411453144445434236254466446337636634543774555355374353662522435224132353244034031000 +002330010431341554551434253422254276654743665367455334457473364473622344254456352551331135411240234 +312302212143534422423465564263334474566667447435655556674563544344656444223542363235332253222404014 +212121032141343134355434224534464675674454653637667644577377433543363445523354433252255211144312024 +032232100153554252235624563224356655547365457745734763767533657435437475664325434442351433444413432 +110200301524124453246544643533747547556475446575748877586377673774564455425343566541443431232401214 +401423221442241424632554334447574565754568668848564545648588775376576657452244522662354432522131430 +104434155511311263462424433673653733578444556668584487456756485643337355375433336556353432343531212 +232312213322425552554325453754633766755865457774587845874856686753435335647736522565231415412413211 +431001313425254645265623577666433748788645854658656747656847848685876376476452325453225544433534043 +313010515252544635324244436374454465476587445778467648477556767674587735374763224263634154351324340 +144012455355126524425677566774755774557844864767878874787745686455847654436466543454462444251355032 +000424311444526324323553475355554746544864774656675767558855668566488767334344352635356531552442234 +013342542545525235236366465754548568775676857795999885788785445466456855736374463562353442551411143 +311242111152354425663445553378875855775477957697697578856798848566484877333477545525362635425135332 +341433232336543522273555566685786646768568869658667859787755556468565557473633366352553433511511241 +200113144455442526465477677487545446885795579597859665775997897975488858867346567332543224253422254 +321322215536436463377577768487764477789778877885995868965678966676487767568444576663626645634432310 +443312521324223555545636634855747678676887796567769797975557659998448677554734374642453342212431515 +411525331432266364737736458775755877785596969568668977556998758996667657677735543737262252641333145 +442522353464222643737346685584745598686858597889698887876897967879654657446543634637433266563152432 +454243531252525455465534878756559675878866666799676687797788596788597656655885633463554433643143535 +254423532244235655655733654475546977569587699768887776679688866766759778548883343347646235554115351 +314314544653622563457635588785666699859596886897989897689788798876985987846687577376763532335135532 +412142442632445563355677548756466696866899796677677889898887669778596858564457554576762226623533152 +332242122354466554535565547487598955988896787986776867776877888955599984888475443433742663453323444 +144151346544425765674636457564767658869896996679899997667979896767868998474585737643642635544533421 +314415255322554774543648464765966788579669799899779987788989898667968687447844667337662354653241144 +531151535525325346676758455659698557997896686798987988779868698785888786564857433665336664523341524 +433523552663344344473467546666588759889896677787898898779776878975758958484784434645376646243431411 +515135226664626774436754686667956875999777879798898978998697788977889685548778857447736246224344422 +145435565465625543633666766675858858766886989979799999899997668785989599567745864566755645326525215 +451353163534546735577664785687859598879898988887899889888777867978579599658876447575744455463535421 +224133454534644344357668774586679766688667987978788777787978767996768679587486553753676234444243145 +212224343354636435353376785568986575788667679879987787799996968667996977844764744747546562653555311 +533215146234664535345776886669575768966898869977999998888778799896585966878485433376437563225631352 +511524423463344353364385568455757877769888788888799787979869867976859678654676857776376644445445215 +351234256625356736743655474675867598588879869899999799789878697766889955677655765744675453466515352 +334415234234535577366766846485775897899678799797988789798686779975797678558486666454465242325255315 +141341534526526535446644587564577966676787678799988989799997999875957694554787466435645653653555414 +313324416232534373476357468674589657599899799798689797986786698995665798657574376535655252364222345 +311221544446655446757777886865788857567967696689867999769799886898598995658847463557355652223224412 +455533545356434343353337767878785976765769968899769879969687867689997585485648456367636362352431235 +344444353536223353357778884687469798765676998669777968698779855796996985778555675367324552333255445 +051125313425464566733636456767476978655987889896897676668688798768558878654457367667555264222423551 +353542241453466263566466444568785959568996966999897988769675557699898764775776773566735422341532411 +022324211323442654554445655776687576866866899996988868898585669578658688644533765553546656434125445 +114453323344233423677473675646888489555668785777968786767598875656578848476447533734652563225415414 +114422544242345362734473678567647667869987569695895789896698699557445648854544743436662644341252531 +121342551166453322745565437644747478898555998668897895775999796995587786474657764352544656531442143 +303141113253266635447343344867888466769679588758558756866968688847688674876656737744543462242255453 +211553143135554522563734546548487876869685667557688879976567575866584774455433565742656362424324221 +124145331431636546255374743445654474455696878969759677857655988487587487353655433225556322453333301 +212244412131664532653366547437778778757756559965879758976787487565565586665457556563646654415332511 +011305211242465446332773543655556877674464555978676866698775787766666456756644432225665434112311020 +004241221433546245432264563633447545674557677448454476555877787756767637433767625564453222213212214 +310343115521416426645326746575333484685764464876676658588877654688747777476753344453622354123212043 +140122345414213664253233365647757664866655755465564678758484884488574665556644653435636451242442431 +244102135324345326634353374375547456884585456867666677454868468687435553747753654545544441144303342 +432104041214342544334655425474547463448788757857558655488554466655536543533544446366314241124214112 +323340324334354443354245236535677365643457874448486874757456574363667673472262365365211122323243114 +430330302152115233222436253333446747553365334585488745577537474744744537762432632263215224143034311 +311442302225213454546466432534566554436677736533674654344734776664563675555452243452512224320440414 +012223322322424155255455565223573376357653457774454463735446656766537352553544256234512225223230043 +301040234123443123232563623663643633535443553744547733637676336764634633454454353153253554114310123 +133230222202333125332643444534665265775555366656333664577746375536432522432632352414133321233403141 +130131122340253113451232453334526422447633735643377464757575366556545326434445112532143151333444233 +123141143123235144241534634442646462453347557645744747744444465243533265534335312135141342344141402 +003321424141234554211325444625623263425263674757674335463664556352656232255214521252351130300034201 +112312001424231145115555432333342644223335545625473535264242623526263634466325543223334324011234121 +000221124024240324421331531356324362422542263363234455442425223655564222213351113145440100221140111 +033311243403013332514242224522366666224344244563634356355445532225333344231213331535121420140433130 +303323104303402340514525522211134233445565565244563523544534354246644545425131313341424434300003032 +011323012002420122421144112234234535335555456426433464426356545662531135434153435334430024313303120 +031202221220044224202355531555315433255252442366562265422542236431311515541243440113402324302332130 +201100001202303212021041315334534534143533633663456666642564224231354441333414120340321342200233132 +221201212012302142404132243444141351134325452546423522255432534112215145442242342110400232302021322 +220223222003322321422133444521333545342441534125321334411524122521525135453342042001304403200303321 +222220302103313411301404030054314141423224422211413131115533525334423132133412232211310121021132101 +122003101321113124242202433422213424522545354542323525531511234344125550023302132204220012211210020 +000112201313122024204100421340022524132134142432553221315323551243135131212431102431311323201221002 +020202200133011113024021012122001204231413324533351552454535514252231001424310042133312311233022121 diff --git a/src/Year_2022/files/P9.txt b/src/Year_2022/files/P9.txt new file mode 100644 index 0000000..6eead55 --- /dev/null +++ b/src/Year_2022/files/P9.txt @@ -0,0 +1,2000 @@ +R 1 +D 1 +L 1 +D 1 +L 2 +U 2 +D 2 +R 1 +D 1 +L 2 +R 1 +L 2 +R 2 +L 1 +R 2 +D 1 +R 1 +D 2 +U 1 +R 1 +D 2 +R 2 +L 1 +D 1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+U 8 +L 14 +U 17 +L 4 +U 18 +D 18 +R 8 +D 13 +L 10 +U 3 +R 9 +L 14 +R 7 +U 14 +R 14 +L 9 +U 5 +R 4 +D 13 +U 10 +D 1 +R 10 +D 4 +R 3 +U 14 +D 10 +U 12 +L 11 +U 9 +L 16 +R 5 +L 14 +D 4 +U 11 +L 2 +R 10 +U 8 +D 9 +L 2 +R 16 +L 1 +R 12 +U 7 +D 11 +U 18 +D 4 +R 8 +U 18 +D 5 +R 15 +U 16 +L 2 +D 15 +U 5 +D 10 +U 18 +L 7 +U 4 +R 2 +U 17 +L 2 +R 3 +D 2 +L 2 +U 3 +R 10 +L 8 +U 4 +L 18 +U 6 +D 11 +R 13 +D 9 +U 10 +L 16 +R 15 +L 4 +D 1 +L 5 +D 7 +U 18 +L 5 +R 7 +L 15 +U 4 +L 6 +U 19 +D 19 +L 2 +R 2 +L 19 +D 9 +L 14 +U 18 +D 12 +R 19 +U 15 +L 16 +U 9 +L 11 +R 5 +L 14 +R 16 +U 19 +D 7 +U 8 +R 6 +U 14 +R 17 +D 9 +L 5 +U 3 +D 9 +U 8 +L 4 +U 12 +D 12 +R 13 +U 3 +R 18 +U 5 +L 12 +U 4 +L 1 +D 14 +R 5 +L 19 +U 17 +R 18 +D 11 +L 4 +U 18 +L 9