This commit is contained in:
David Doblas Jiménez 2022-01-05 16:12:54 +01:00
parent b97958bf26
commit 1352cd9394
33 changed files with 12548 additions and 0 deletions

88
src/2020/P1.py Normal file
View File

@ -0,0 +1,88 @@
# --- Day 1: Report Repair ---
# After saving Christmas five years in a row, you've decided to take a vacation
# at a nice resort on a tropical island. Surely, Christmas will go on without you.
# The tropical island has its own currency and is entirely cash-only. The gold
# coins used there have a little picture of a starfish; the locals just call
# them stars. None of the currency exchanges seem to have heard of them, but
# somehow, you'll need to find fifty of these coins by the time you arrive so
# you can pay the deposit on your room.
# To save your vacation, you need to get all fifty stars by December 25th.
# 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!
# Before you leave, the Elves in accounting just need you to fix your expense
# report (your puzzle input); apparently, something isn't quite adding up.
# Specifically, they need you to find the two entries that sum to 2020 and then
# multiply those two numbers together.
# For example, suppose your expense report contained the following:
# 1721
# 979
# 366
# 299
# 675
# 1456
# In this list, the two entries that sum to 2020 are 1721 and 299. Multiplying
# them together produces 1721 * 299 = 514579, so the correct answer is 514579.
# Of course, your expense report is much larger. Find the two entries that sum
# to 2020; what do you get if you multiply them together?
with open("files/P1.txt", "r") as f:
numbers = [int(number) for number in f.read().strip().split("\n")]
def part_1() -> None:
for n in numbers:
for i in range(len(numbers)):
if n + numbers[i] == 2020:
print(f"{n} times {numbers[i]} is {n*numbers[i]}")
break
else:
continue
break
# --- Part Two ---
# The Elves in accounting are thankful for your help; one of them even offers
# you a starfish coin they had left over from a past vacation. They offer you
# a second one if you can find three numbers in your expense report that meet
# the same criteria.
# Using the above example again, the three entries that sum to 2020 are 979,
# 366, and 675. Multiplying them together produces the answer, 241861950.
# In your expense report, what is the product of the three entries that sum to
# 2020?
def part_2() -> None:
for n in numbers:
for i in range(len(numbers)):
for j in range(len(numbers)):
if n + numbers[i] + numbers[j] == 2020:
print(
f"{n} times {numbers[i]} times {numbers[j]} is "
f"{n*numbers[i]*numbers[j]}"
)
break
else:
continue
break
else:
continue
break
if __name__ == "__main__":
part_1()
part_2()

227
src/2020/P10.py Normal file
View File

@ -0,0 +1,227 @@
from functools import lru_cache
import numpy as np
# --- Day 10: Adapter Array ---
# Patched into the aircraft's data port, you discover weather forecasts of a
# massive tropical storm. Before you can figure out whether it will impact your
# vacation plans, however, your device suddenly turns off!
# Its battery is dead.
# You'll need to plug it in. There's only one problem: the charging outlet near
# your seat produces the wrong number of jolts. Always prepared, you make a
# list of all of the joltage adapters in your bag.
# Each of your joltage adapters is rated for a specific output joltage (your
# puzzle input). Any given adapter can take an input 1, 2, or 3 jolts lower
# than its rating and still produce its rated output joltage.
# In addition, your device has a built-in joltage adapter rated for 3 jolts
# higher than the highest-rated adapter in your bag. (If your adapter list were
# 3, 9, and 6, your device's built-in adapter would be rated for 12 jolts.)
# Treat the charging outlet near your seat as having an effective joltage
# rating of 0.
# Since you have some time to kill, you might as well test all of your
# adapters. Wouldn't want to get to your resort and realize you can't even
# charge your device!
# If you use every adapter in your bag at once, what is the distribution of
# joltage differences between the charging outlet, the adapters, and your
# device?
# For example, suppose that in your bag, you have adapters with the following
# joltage ratings:
# 16
# 10
# 15
# 5
# 1
# 11
# 7
# 19
# 6
# 12
# 4
# With these adapters, your device's built-in joltage adapter would be rated
# for 19 + 3 = 22 jolts, 3 higher than the highest-rated adapter.
# Because adapters can only connect to a source 1-3 jolts lower than its
# rating, in order to use every adapter, you'd need to choose them like this:
# The charging outlet has an effective rating of 0 jolts, so the only
# adapters that could connect to it directly would need to have a joltage
# rating of 1, 2, or 3 jolts. Of these, only one you have is an adapter rated 1
# jolt (difference of 1).
# From your 1-jolt rated adapter, the only choice is your 4-jolt rated
# adapter (difference of 3).
# From the 4-jolt rated adapter, the adapters rated 5, 6, or 7 are valid
# choices. However, in order to not skip any adapters, you have to pick the
# adapter rated 5 jolts (difference of 1).
# Similarly, the next choices would need to be the adapter rated 6 and then
# the adapter rated 7 (with difference of 1 and 1).
# The only adapter that works with the 7-jolt rated adapter is the one
# rated 10 jolts (difference of 3).
# From 10, the choices are 11 or 12; choose 11 (difference of 1) and then
# 12 (difference of 1).
# After 12, only valid adapter has a rating of 15 (difference of 3), then
# 16 (difference of 1), then 19 (difference of 3).
# Finally, your device's built-in adapter is always 3 higher than the
# highest adapter, so its rating is 22 jolts (always a difference of 3).
# In this example, when using every adapter, there are 7 differences of 1 jolt
# and 5 differences of 3 jolts.
# Here is a larger example:
# 28
# 33
# 18
# 42
# 31
# 14
# 46
# 20
# 48
# 47
# 24
# 23
# 49
# 45
# 19
# 38
# 39
# 11
# 1
# 32
# 25
# 35
# 8
# 17
# 7
# 9
# 4
# 2
# 34
# 10
# 3
# In this larger example, in a chain that uses all of the adapters, there are
# 22 differences of 1 jolt and 10 differences of 3 jolts.
# Find a chain that uses all of your adapters to connect the charging outlet to
# your device's built-in adapter and count the joltage differences between the
# charging outlet, the adapters, and your device. What is the number of 1-jolt
# differences multiplied by the number of 3-jolt differences?
with open("files/P10.txt", "r") as f:
inputs = [int(num) for num in f.read().strip().split("\n")]
# Add zero (charging outlet) and max+3 (device own built-in adapter)
joltages = sorted(inputs + [0, max(inputs) + 3])
def part_1() -> None:
joltages_diffs = np.diff(joltages)
print(
f"The difference is {np.sum(joltages_diffs == 1) * np.sum(joltages_diffs == 3)}"
)
# --- Part Two ---
# To completely determine whether you have enough adapters, you'll need to
# figure out how many different ways they can be arranged. Every arrangement
# needs to connect the charging outlet to your device. The previous rules about
# when adapters can successfully connect still apply.
# The first example above (the one that starts with 16, 10, 15) supports the
# following arrangements:
# (0), 1, 4, 5, 6, 7, 10, 11, 12, 15, 16, 19, (22)
# (0), 1, 4, 5, 6, 7, 10, 12, 15, 16, 19, (22)
# (0), 1, 4, 5, 7, 10, 11, 12, 15, 16, 19, (22)
# (0), 1, 4, 5, 7, 10, 12, 15, 16, 19, (22)
# (0), 1, 4, 6, 7, 10, 11, 12, 15, 16, 19, (22)
# (0), 1, 4, 6, 7, 10, 12, 15, 16, 19, (22)
# (0), 1, 4, 7, 10, 11, 12, 15, 16, 19, (22)
# (0), 1, 4, 7, 10, 12, 15, 16, 19, (22)
# (The charging outlet and your device's built-in adapter are shown in
# parentheses.) Given the adapters from the first example, the total number of
# arrangements that connect the charging outlet to your device is 8.
# The second example above (the one that starts with 28, 33, 18) has many
# arrangements. Here are a few:
# (0), 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 17, 18, 19, 20, 23, 24, 25, 28, 31,
# 32, 33, 34, 35, 38, 39, 42, 45, 46, 47, 48, 49, (52)
# (0), 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 17, 18, 19, 20, 23, 24, 25, 28, 31,
# 32, 33, 34, 35, 38, 39, 42, 45, 46, 47, 49, (52)
# (0), 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 17, 18, 19, 20, 23, 24, 25, 28, 31,
# 32, 33, 34, 35, 38, 39, 42, 45, 46, 48, 49, (52)
# (0), 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 17, 18, 19, 20, 23, 24, 25, 28, 31,
# 32, 33, 34, 35, 38, 39, 42, 45, 46, 49, (52)
# (0), 1, 2, 3, 4, 7, 8, 9, 10, 11, 14, 17, 18, 19, 20, 23, 24, 25, 28, 31,
# 32, 33, 34, 35, 38, 39, 42, 45, 47, 48, 49, (52)
# (0), 3, 4, 7, 10, 11, 14, 17, 20, 23, 25, 28, 31, 34, 35, 38, 39, 42, 45,
# 46, 48, 49, (52)
# (0), 3, 4, 7, 10, 11, 14, 17, 20, 23, 25, 28, 31, 34, 35, 38, 39, 42, 45,
# 46, 49, (52)
# (0), 3, 4, 7, 10, 11, 14, 17, 20, 23, 25, 28, 31, 34, 35, 38, 39, 42, 45,
# 47, 48, 49, (52)
# (0), 3, 4, 7, 10, 11, 14, 17, 20, 23, 25, 28, 31, 34, 35, 38, 39, 42, 45,
# 47, 49, (52)
# (0), 3, 4, 7, 10, 11, 14, 17, 20, 23, 25, 28, 31, 34, 35, 38, 39, 42, 45,
# 48, 49, (52)
# In total, this set of adapters can connect the charging outlet to your device
# in 19208 distinct arrangements.
# You glance back down at your bag and try to remember why you brought so many
# adapters; there must be more than a trillion valid ways to arrange them!
# Surely, there must be an efficient way to count the arrangements.
# What is the total number of distinct ways you can arrange the adapters to
# connect the charging outlet to your device?
@lru_cache(maxsize=256)
def recursion(node: int) -> int:
if node == len(joltages) - 1:
return 1
# consider last three nodes (or the end of the list, whichever is first),
# and for any that are valid jumps (value is no more than three more),
# find the number of paths from that node to the end.
return sum(
[
recursion(current_node)
for current_node in range(node + 1, min(node + 4, len(joltages)))
if joltages[current_node] - joltages[node] <= 3
]
)
def part_2() -> None:
total_num = recursion(0)
print(f"The total number of distint ways is {total_num}")
if __name__ == "__main__":
part_1()
part_2()

367
src/2020/P11.py Normal file
View File

@ -0,0 +1,367 @@
# --- Day 11: Seating System ---
# Your plane lands with plenty of time to spare. The final leg of your journey
# is a ferry that goes directly to the tropical island where you can finally
# start your vacation. As you reach the waiting area to board the ferry, you
# realize you're so early, nobody else has even arrived yet!
# By modeling the process people use to choose (or abandon) their seat in the
# waiting area, you're pretty sure you can predict the best place to sit. You
# make a quick map of the seat layout (your puzzle input).
# The seat layout fits neatly on a grid. Each position is either floor (.), an
# empty seat (L), or an occupied seat (#). For example, the initial seat layout
# might look like this:
# L.LL.LL.LL
# LLLLLLL.LL
# L.L.L..L..
# LLLL.LL.LL
# L.LL.LL.LL
# L.LLLLL.LL
# ..L.L.....
# LLLLLLLLLL
# L.LLLLLL.L
# L.LLLLL.LL
# Now, you just need to model the people who will be arriving shortly.
# Fortunately, people are entirely predictable and always follow a simple set
# of rules. All decisions are based on the number of occupied seats adjacent to
# a given seat (one of the eight positions immediately up, down, left, right,
# or diagonal from the seat). The following rules are applied to every seat
# simultaneously:
# If a seat is empty (L) and there are no occupied seats adjacent to it,
# the seat becomes occupied.
# If a seat is occupied (#) and four or more seats adjacent to it are also
# occupied, the seat becomes empty.
# Otherwise, the seat's state does not change.
# Floor (.) never changes; seats don't move, and nobody sits on the floor.
# After one round of these rules, every seat in the example layout becomes
# occupied:
# #.##.##.##
# #######.##
# #.#.#..#..
# ####.##.##
# #.##.##.##
# #.#####.##
# ..#.#.....
# ##########
# #.######.#
# #.#####.##
# After a second round, the seats with four or more occupied adjacent seats
# become empty again:
# #.LL.L#.##
# #LLLLLL.L#
# L.L.L..L..
# #LLL.LL.L#
# #.LL.LL.LL
# #.LLLL#.##
# ..L.L.....
# #LLLLLLLL#
# #.LLLLLL.L
# #.#LLLL.##
# This process continues for three more rounds:
# #.##.L#.##
# #L###LL.L#
# L.#.#..#..
# #L##.##.L#
# #.##.LL.LL
# #.###L#.##
# ..#.#.....
# #L######L#
# #.LL###L.L
# #.#L###.##
# #.#L.L#.##
# #LLL#LL.L#
# L.L.L..#..
# #LLL.##.L#
# #.LL.LL.LL
# #.LL#L#.##
# ..L.L.....
# #L#LLLL#L#
# #.LLLLLL.L
# #.#L#L#.##
# #.#L.L#.##
# #LLL#LL.L#
# L.#.L..#..
# #L##.##.L#
# #.#L.LL.LL
# #.#L#L#.##
# ..L.L.....
# #L#L##L#L#
# #.LLLLLL.L
# #.#L#L#.##
# At this point, something interesting happens: the chaos stabilizes and
# further applications of these rules cause no seats to change state! Once
# people stop moving around, you count 37 occupied seats.
# Simulate your seating area by applying the seating rules repeatedly until no
# seats change state. How many seats end up occupied?
with open("files/P11.txt", "r") as f:
seats = [line for line in f.read().strip().split("\n")]
def seats_around(seats: list[str], r: int, c: int) -> int:
total = 0
around_me = [
(-1, -1),
(-1, 0),
(-1, 1),
(0, -1),
(0, 1),
(1, -1),
(1, 0),
(1, 1),
]
for row, col in around_me:
_row = r + row
_col = c + col
if (
_row >= 0
and _row < len(seats)
and _col >= 0
and _col < len(seats[c])
):
total += seats[_row][_col] == "#"
return total
def free_seats(v: list[str]) -> int:
total = 0
for row in v:
total += row.count("#")
return total
def part_1(seats: list[str]) -> None:
R = len(seats)
C = len(seats[0])
while True:
has_changed = False
next_iter = []
for r in range(R):
new_row = ""
for c in range(C):
seat = seats[r][c]
if seat != ".":
occupants = seats_around(seats, r, c)
if seat == "L" and occupants == 0:
seat = "#"
has_changed = True
elif seat == "#" and occupants >= 4:
seat = "L"
has_changed = True
new_row += seat
next_iter.append(new_row)
if not has_changed:
break
seats = next_iter
print(f"There are {free_seats(seats)} seats occupied")
# --- Part Two ---
# As soon as people start to arrive, you realize your mistake. People don't
# just care about adjacent seats - they care about the first seat they can see
# in each of those eight directions!
# Now, instead of considering just the eight immediately adjacent seats,
# consider the first seat in each of those eight directions. For example, the
# empty seat below would see eight occupied seats:
# .......#.
# ...#.....
# .#.......
# .........
# ..#L....#
# ....#....
# .........
# #........
# ...#.....
# The leftmost empty seat below would only see one empty seat, but cannot see
# any of the occupied ones:
# .............
# .L.L.#.#.#.#.
# .............
# The empty seat below would see no occupied seats:
# .##.##.
# #.#.#.#
# ##...##
# ...L...
# ##...##
# #.#.#.#
# .##.##.
# Also, people seem to be more tolerant than you expected: it now takes five or
# more visible occupied seats for an occupied seat to become empty (rather than
# four or more from the previous rules). The other rules still apply: empty
# seats that see no occupied seats become occupied, seats matching no rule
# don't change, and floor never changes.
# Given the same starting layout as above, these new rules cause the seating
# area to shift around as follows:
# L.LL.LL.LL
# LLLLLLL.LL
# L.L.L..L..
# LLLL.LL.LL
# L.LL.LL.LL
# L.LLLLL.LL
# ..L.L.....
# LLLLLLLLLL
# L.LLLLLL.L
# L.LLLLL.LL
# #.##.##.##
# #######.##
# #.#.#..#..
# ####.##.##
# #.##.##.##
# #.#####.##
# ..#.#.....
# ##########
# #.######.#
# #.#####.##
# #.LL.LL.L#
# #LLLLLL.LL
# L.L.L..L..
# LLLL.LL.LL
# L.LL.LL.LL
# L.LLLLL.LL
# ..L.L.....
# LLLLLLLLL#
# #.LLLLLL.L
# #.LLLLL.L#
# #.L#.##.L#
# #L#####.LL
# L.#.#..#..
# ##L#.##.##
# #.##.#L.##
# #.#####.#L
# ..#.#.....
# LLL####LL#
# #.L#####.L
# #.L####.L#
# #.L#.L#.L#
# #LLLLLL.LL
# L.L.L..#..
# ##LL.LL.L#
# L.LL.LL.L#
# #.LLLLL.LL
# ..L.L.....
# LLLLLLLLL#
# #.LLLLL#.L
# #.L#LL#.L#
# #.L#.L#.L#
# #LLLLLL.LL
# L.L.L..#..
# ##L#.#L.L#
# L.L#.#L.L#
# #.L####.LL
# ..#.#.....
# LLL###LLL#
# #.LLLLL#.L
# #.L#LL#.L#
# #.L#.L#.L#
# #LLLLLL.LL
# L.L.L..#..
# ##L#.#L.L#
# L.L#.LL.L#
# #.LLLL#.LL
# ..#.L.....
# LLL###LLL#
# #.LLLLL#.L
# #.L#LL#.L#
# Again, at this point, people stop shifting around and the seating area
# reaches equilibrium. Once this occurs, you count 26 occupied seats.
# Given the new visibility method and the rule change for occupied seats
# becoming empty, once equilibrium is reached, how many seats end up occupied?
def seats_around_mod(seats: list[str], r: int, c: int) -> int:
total = 0
around_me = [
(-1, -1),
(-1, 0),
(-1, 1),
(0, -1),
(0, 1),
(1, -1),
(1, 0),
(1, 1),
]
for row, col in around_me:
_row = r + row
_col = c + col
while (
_row >= 0
and _row < len(seats)
and _col < len(seats[c])
and seats[_row][_col] == "."
):
_row += row
_col += col
if (
_row >= 0
and _row < len(seats)
and _col >= 0
and _col < len(seats[c])
):
total += seats[_row][_col] == "#"
return total
def part_2(seats: list[str]) -> None:
R = len(seats)
C = len(seats[0])
while True:
has_changed = False
next_iter = []
for r in range(R):
new_row = ""
for c in range(C):
seat = seats[r][c]
if seat != ".":
occupants = seats_around_mod(seats, r, c)
if seat == "L" and occupants == 0:
seat = "#"
has_changed = True
elif seat == "#" and occupants >= 5:
seat = "L"
has_changed = True
new_row += seat
next_iter.append(new_row)
if not has_changed:
break
seats = next_iter
print(f"There are {free_seats(seats)} seats occupied")
if __name__ == "__main__":
part_1(seats)
part_2(seats)

185
src/2020/P12.py Normal file
View File

@ -0,0 +1,185 @@
import math
# --- Day 12: Rain Risk ---
# Your ferry made decent progress toward the island, but the storm came in
# faster than anyone expected. The ferry needs to take evasive actions!
# Unfortunately, the ship's navigation computer seems to be malfunctioning;
# rather than giving a route directly to safety, it produced extremely
# circuitous instructions. When the captain uses the PA system to ask if anyone
# can help, you quickly volunteer.
# The navigation instructions (your puzzle input) consists of a sequence of
# single-character actions paired with integer input values. After staring at
# them for a few minutes, you work out what they probably mean:
# Action N means to move north by the given value.
# Action S means to move south by the given value.
# Action E means to move east by the given value.
# Action W means to move west by the given value.
# Action L means to turn left the given number of degrees.
# Action R means to turn right the given number of degrees.
# Action F means to move forward by the given value in the direction the ship is currently facing.
# The ship starts by facing east. Only the L and R actions change the direction
# the ship is facing. (That is, if the ship is facing east and the next
# instruction is N10, the ship would move north 10 units, but would still move
# east if the following action were F.)
# For example:
# F10
# N3
# F7
# R90
# F11
# These instructions would be handled as follows:
# F10 would move the ship 10 units east (because the ship starts by facing
# east) to east 10, north 0.
# N3 would move the ship 3 units north to east 10, north 3.
# F7 would move the ship another 7 units east (because the ship is still
# facing east) to east 17, north 3.
# R90 would cause the ship to turn right by 90 degrees and face south; it
# remains at east 17, north 3.
# F11 would move the ship 11 units south to east 17, south 8.
# At the end of these instructions, the ship's Manhattan distance (sum of the
# absolute values of its east/west position and its north/south position) from
# its starting position is 17 + 8 = 25.
# Figure out where the navigation instructions lead. What is the Manhattan
# distance between that location and the ship's starting position?
with open("files/P12.txt", "r") as f:
instructions = [line for line in f.read().strip().split("\n")]
def part_1() -> None:
# dirs are E, S, W, and N
dirs = [[1, 0], [0, -1], [-1, 0], [0, 1]]
current_pos = [0, 0]
current_dir = 0
for instr in instructions:
_dir, _num = instr[:1], instr[1:]
if _dir == "E":
current_pos[0] += int(_num)
elif _dir == "W":
current_pos[0] -= int(_num)
elif _dir == "N":
current_pos[1] += int(_num)
elif _dir == "S":
current_pos[1] -= int(_num)
elif _dir == "F":
current_pos[0] += int(_num) * dirs[current_dir][0]
current_pos[1] += int(_num) * dirs[current_dir][1]
else:
if _dir == "R":
# rotations are clockwise
current_dir += int(_num) // 90
else:
current_dir -= int(_num) // 90
# avoid rotation overflow, just in case
current_dir %= 4
manhattan_distance = abs(current_pos[0]) + abs(current_pos[1])
print(f"The Manhattan distance is {manhattan_distance}")
# --- Part Two ---
# Before you can give the destination to the captain, you realize that the
# actual action meanings were printed on the back of the instructions the whole
# time.
# Almost all of the actions indicate how to move a waypoint which is relative
# to the ship's position:
# Action N means to move the waypoint north by the given value.
# Action S means to move the waypoint south by the given value.
# Action E means to move the waypoint east by the given value.
# Action W means to move the waypoint west by the given value.
# Action L means to rotate the waypoint around the ship left
# (counter-clockwise) the given number of degrees.
# Action R means to rotate the waypoint around the ship right (clockwise)
# the given number of degrees.
# Action F means to move forward to the waypoint a number of times equal to
# the given value.
# The waypoint starts 10 units east and 1 unit north relative to the ship. The
# waypoint is relative to the ship; that is, if the ship moves, the waypoint
# moves with it.
# For example, using the same instructions as above:
# F10 moves the ship to the waypoint 10 times (a total of 100 units east
# and 10 units north), leaving the ship at east 100, north 10. The waypoint
# stays 10 units east and 1 unit north of the ship.
# N3 moves the waypoint 3 units north to 10 units east and 4 units north of
# the ship. The ship remains at east 100, north 10.
# F7 moves the ship to the waypoint 7 times (a total of 70 units east and
# 28 units north), leaving the ship at east 170, north 38. The waypoint stays
# 10 units east and 4 units north of the ship.
# R90 rotates the waypoint around the ship clockwise 90 degrees, moving it
# to 4 units east and 10 units south of the ship. The ship remains at east 170,
# north 38.
# F11 moves the ship to the waypoint 11 times (a total of 44 units east and
# 110 units south), leaving the ship at east 214, south 72. The waypoint stays
# 4 units east and 10 units south of the ship.
# After these operations, the ship's Manhattan distance from its starting
# position is 214 + 72 = 286.
# Figure out where the navigation instructions actually lead. What is the
# Manhattan distance between that location and the ship's starting position?
def part_2() -> None:
ship_pos = [0, 0]
waypoint_pos = [10, 1]
waypoint_dir = 0
for instr in instructions:
_dir, _num = instr[:1], instr[1:]
if _dir == "E":
waypoint_pos[0] += int(_num)
elif _dir == "W":
waypoint_pos[0] -= int(_num)
elif _dir == "N":
waypoint_pos[1] += int(_num)
elif _dir == "S":
waypoint_pos[1] -= int(_num)
elif _dir == "F":
ship_pos[0] += int(_num) * waypoint_pos[0]
ship_pos[1] += int(_num) * waypoint_pos[1]
else:
if _dir == "R":
# rotations are clockwise
_num = str(360 - int(_num))
waypoint_dir += int(_num)
# avoid rotation overflow
waypoint_dir %= 360
# convert to radians to make life easier
radians = math.radians(int(_num))
waypoint_pos = [
round(
(waypoint_pos[0] * math.cos(radians))
- (waypoint_pos[1] * math.sin(radians))
),
round(
(waypoint_pos[0] * math.sin(radians))
+ (waypoint_pos[1] * math.cos(radians))
),
]
manhattan_distance = abs(ship_pos[0]) + abs(ship_pos[1])
print(f"The Manhattan distance is {manhattan_distance}")
if __name__ == "__main__":
part_1()
part_2()

209
src/2020/P13.py Normal file
View File

@ -0,0 +1,209 @@
# --- Day 13: Shuttle Search ---
# Your ferry can make it safely to a nearby port, but it won't get much
# further. When you call to book another ship, you discover that no ships
# embark from that port to your vacation island. You'll need to get from the
# port to the nearest airport.
# Fortunately, a shuttle bus service is available to bring you from the sea
# port to the airport! Each bus has an ID number that also indicates how often
# the bus leaves for the airport.
# Bus schedules are defined based on a timestamp that measures the number of
# minutes since some fixed reference point in the past. At timestamp 0, every
# bus simultaneously departed from the sea port. After that, each bus travels
# to the airport, then various other locations, and finally returns to the sea
# port to repeat its journey forever.
# The time this loop takes a particular bus is also its ID number: the bus with
# ID 5 departs from the sea port at timestamps 0, 5, 10, 15, and so on. The bus
# with ID 11 departs at 0, 11, 22, 33, and so on. If you are there when the bus
# departs, you can ride that bus to the airport!
# Your notes (your puzzle input) consist of two lines. The first line is your
# estimate of the earliest timestamp you could depart on a bus. The second line
# lists the bus IDs that are in service according to the shuttle company;
# entries that show x must be out of service, so you decide to ignore them.
# To save time once you arrive, your goal is to figure out the earliest bus you
# can take to the airport. (There will be exactly one such bus.)
# For example, suppose you have the following notes:
# 939
# 7,13,x,x,59,x,31,19
# Here, the earliest timestamp you could depart is 939, and the bus IDs in
# service are 7, 13, 59, 31, and 19. Near timestamp 939, these bus IDs depart
# at the times marked D:
# time bus 7 bus 13 bus 59 bus 31 bus 19
# 929 . . . . .
# 930 . . . D .
# 931 D . . . D
# 932 . . . . .
# 933 . . . . .
# 934 . . . . .
# 935 . . . . .
# 936 . D . . .
# 937 . . . . .
# 938 D . . . .
# 939 . . . . .
# 940 . . . . .
# 941 . . . . .
# 942 . . . . .
# 943 . . . . .
# 944 . . D . .
# 945 D . . . .
# 946 . . . . .
# 947 . . . . .
# 948 . . . . .
# 949 . D . . .
# The earliest bus you could take is bus ID 59. It doesn't depart until
# timestamp 944, so you would need to wait 944 - 939 = 5 minutes before it
# departs. Multiplying the bus ID by the number of minutes you'd need to wait
# gives 295.
# What is the ID of the earliest bus you can take to the airport multiplied by
# the number of minutes you'll need to wait for that bus?
from copy import copy
from math import gcd
with open("files/P13.txt", "r") as f:
start = int(f.readline())
buses_x = [bus for bus in f.readline().strip().split(",")]
buses = [int(bus) for bus in buses_x if bus != "x"]
def part_1() -> None:
wait = copy(start)
found = False
while not found:
for bus in buses:
if wait % bus == 0:
print(f"Solution to part 1 is {str((wait - start) * bus)}")
found = True
break
wait += 1
# --- Part Two ---
# The shuttle company is running a contest: one gold coin for anyone that can
# find the earliest timestamp such that the first bus ID departs at that time
# and each subsequent listed bus ID departs at that subsequent minute. (The
# first line in your input is no longer relevant.)
# For example, suppose you have the same list of bus IDs as above:
# 7,13,x,x,59,x,31,19
# An x in the schedule means there are no constraints on what bus IDs must
# depart at that time.
# This means you are looking for the earliest timestamp (called t) such that:
# Bus ID 7 departs at timestamp t.
# Bus ID 13 departs one minute after timestamp t.
# There are no requirements or restrictions on departures at two or three
# minutes after timestamp t.
# Bus ID 59 departs four minutes after timestamp t.
# There are no requirements or restrictions on departures at five minutes
# after timestamp t.
# Bus ID 31 departs six minutes after timestamp t.
# Bus ID 19 departs seven minutes after timestamp t.
# The only bus departures that matter are the listed bus IDs at their specific
# offsets from t. Those bus IDs can depart at other times, and other bus IDs
# can depart at those times. For example, in the list above, because bus ID 19
# must depart seven minutes after the timestamp at which bus ID 7 departs, bus
# ID 7 will always also be departing with bus ID 19 at seven minutes after
# timestamp t.
# In this example, the earliest timestamp at which this occurs is 1068781:
# time bus 7 bus 13 bus 59 bus 31 bus 19
# 1068773 . . . . .
# 1068774 D . . . .
# 1068775 . . . . .
# 1068776 . . . . .
# 1068777 . . . . .
# 1068778 . . . . .
# 1068779 . . . . .
# 1068780 . . . . .
# 1068781 D . . . .
# 1068782 . D . . .
# 1068783 . . . . .
# 1068784 . . . . .
# 1068785 . . D . .
# 1068786 . . . . .
# 1068787 . . . D .
# 1068788 D . . . D
# 1068789 . . . . .
# 1068790 . . . . .
# 1068791 . . . . .
# 1068792 . . . . .
# 1068793 . . . . .
# 1068794 . . . . .
# 1068795 D D . . .
# 1068796 . . . . .
# 1068797 . . . . .
# In the above example, bus ID 7 departs at timestamp 1068788 (seven minutes
# after t). This is fine; the only requirement on that minute is that bus ID 19
# departs then, and it does.
# Here are some other examples:
# The earliest timestamp that matches the list 17,x,13,19 is 3417.
# 67,7,59,61 first occurs at timestamp 754018.
# 67,x,7,59,61 first occurs at timestamp 779210.
# 67,7,x,59,61 first occurs at timestamp 1261476.
# 1789,37,47,1889 first occurs at timestamp 1202161486.
# However, with so many bus IDs in your list, surely the actual earliest
# timestamp will be larger than 100000000000000!
# What is the earliest timestamp such that all of the listed bus IDs depart at
# offsets matching their positions in the list?
# adapted from https://stackoverflow.com/questions/32728526/lcm-using-recursive
def lcm(my_list: list[list[int]]) -> int:
lcm = my_list[0][0]
for pair in my_list[1:]:
lcm = lcm * pair[0] // gcd(lcm, pair[0])
return lcm
def part_2() -> None:
my_buses = []
for idx, bus in enumerate(buses_x):
if bus != "x":
my_buses.append([int(bus), idx])
value = 0
add_to = 1
for i in range(1, len(my_buses)):
good = False
while not good:
good = True
for j in range(i + 1):
if (value + my_buses[j][1]) % my_buses[j][0] != 0:
good = False
break
if good is True:
# find the offset between buses
add_to = lcm(my_buses[:j])
break
else:
value += add_to
print(f"Solution to part 2 is {value}")
if __name__ == "__main__":
part_1()
part_2()

199
src/2020/P14.py Normal file
View File

@ -0,0 +1,199 @@
# --- Day 14: Docking Data ---
# As your ferry approaches the sea port, the captain asks for your help again.
# The computer system that runs this port isn't compatible with the docking
# program on the ferry, so the docking parameters aren't being correctly
# initialized in the docking program's memory.
# After a brief inspection, you discover that the sea port's computer system
# uses a strange bitmask system in its initialization program. Although you
# don't have the correct decoder chip handy, you can emulate it in software!
# The initialization program (your puzzle input) can either update the bitmask
# or write a value to memory. Values and memory addresses are both 36-bit
# unsigned integers. For example, ignoring bitmasks for a moment, a line like
# mem[8] = 11 would write the value 11 to memory address 8.
# The bitmask is always given as a string of 36 bits, written with the most
# significant bit (representing 2^35) on the left and the least significant bit
# (2^0, that is, the 1s bit) on the right. The current bitmask is applied to
# values immediately before they are written to memory: a 0 or 1 overwrites the
# corresponding bit in the value, while an X leaves the bit in the value
# unchanged.
# For example, consider the following program:
# mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
# mem[8] = 11
# mem[7] = 101
# mem[8] = 0
# This program starts by specifying a bitmask (mask = ....). The mask it
# specifies will overwrite two bits in every written value: the 2s bit is
# overwritten with 0, and the 64s bit is overwritten with 1.
# The program then attempts to write the value 11 to memory address 8. By
# expanding everything out to individual bits, the mask is applied as follows:
# value: 000000000000000000000000000000001011 (decimal 11)
# mask: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
# result: 000000000000000000000000000001001001 (decimal 73)
# So, because of the mask, the value 73 is written to memory address 8 instead.
# Then, the program tries to write 101 to address 7:
# value: 000000000000000000000000000001100101 (decimal 101)
# mask: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
# result: 000000000000000000000000000001100101 (decimal 101)
# This time, the mask has no effect, as the bits it overwrote were already the
# values the mask tried to set. Finally, the program tries to write 0 to
# address 8:
# value: 000000000000000000000000000000000000 (decimal 0)
# mask: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
# result: 000000000000000000000000000001000000 (decimal 64)
# 64 is written to address 8 instead, overwriting the value that was there
# previously.
# To initialize your ferry's docking program, you need the sum of all values
# left in memory after the initialization program completes. (The entire 36-bit
# address space begins initialized to the value 0 at every address.) In the
# above example, only two values in memory are not zero - 101 (at address 7)
# and 64 (at address 8) - producing a sum of 165.
# Execute the initialization program. What is the sum of all values left in
# memory after it completes? (Do not truncate the sum to 36 bits.)
with open("files/P14.txt", "r") as f:
instructions = [line for line in f.read().strip().split("\n")]
def part_1() -> None:
memory = {}
for instruction in instructions:
if instruction.startswith("mask"):
mask = instruction.split(" = ")[1]
mask_or = int(mask.replace("X", "0"), 2)
mask_and = int(mask.replace("X", "1"), 2)
elif instruction.startswith("mem"):
idx = int(instruction.split("[")[1].split("]")[0])
val = int(instruction.split(" = ")[1])
memory[idx] = (val & mask_and) | mask_or
values_in_memory = sum([val for val in memory.values()])
print(f"The sum of all values in memory is {values_in_memory}")
# --- Part Two ---
# For some reason, the sea port's computer system still can't communicate with
# your ferry's docking program. It must be using version 2 of the decoder chip!
# A version 2 decoder chip doesn't modify the values being written at all.
# Instead, it acts as a memory address decoder. Immediately before a value is
# written to memory, each bit in the bitmask modifies the corresponding bit of
# the destination memory address in the following way:
# If the bitmask bit is 0, the corresponding memory address bit is
# unchanged.
# If the bitmask bit is 1, the corresponding memory address bit is
# overwritten with 1.
# If the bitmask bit is X, the corresponding memory address bit is
# floating.
# A floating bit is not connected to anything and instead fluctuates
# unpredictably. In practice, this means the floating bits will take on all
# possible values, potentially causing many memory addresses to be written all
# at once!
# For example, consider the following program:
# mask = 000000000000000000000000000000X1001X
# mem[42] = 100
# mask = 00000000000000000000000000000000X0XX
# mem[26] = 1
# When this program goes to write to memory address 42, it first applies the
# bitmask:
# address: 000000000000000000000000000000101010 (decimal 42)
# mask: 000000000000000000000000000000X1001X
# result: 000000000000000000000000000000X1101X
# After applying the mask, four bits are overwritten, three of which are
# different, and two of which are floating. Floating bits take on every
# possible combination of values; with two floating bits, four actual memory
# addresses are written:
# 000000000000000000000000000000011010 (decimal 26)
# 000000000000000000000000000000011011 (decimal 27)
# 000000000000000000000000000000111010 (decimal 58)
# 000000000000000000000000000000111011 (decimal 59)
# Next, the program is about to write to memory address 26 with a different
# bitmask:
# address: 000000000000000000000000000000011010 (decimal 26)
# mask: 00000000000000000000000000000000X0XX
# result: 00000000000000000000000000000001X0XX
# This results in an address with three floating bits, causing writes to eight
# memory addresses:
# 000000000000000000000000000000010000 (decimal 16)
# 000000000000000000000000000000010001 (decimal 17)
# 000000000000000000000000000000010010 (decimal 18)
# 000000000000000000000000000000010011 (decimal 19)
# 000000000000000000000000000000011000 (decimal 24)
# 000000000000000000000000000000011001 (decimal 25)
# 000000000000000000000000000000011010 (decimal 26)
# 000000000000000000000000000000011011 (decimal 27)
# The entire 36-bit address space still begins initialized to the value 0 at
# every address, and you still need the sum of all values left in memory at the
# end of the program. In this example, the sum is 208.
# Execute the initialization program using an emulator for a version 2 decoder
# chip. What is the sum of all values left in memory after it completes?
def get_indexes(mask: str) -> list[int]:
try:
firstx = mask.index("X")
return get_indexes(
mask[:firstx] + "0" + mask[firstx + 1 :]
) + get_indexes(mask[:firstx] + "1" + mask[firstx + 1 :])
except ValueError:
return [int(mask, 2)]
def part_2() -> None:
memory = {}
for instruction in instructions:
if instruction.startswith("mask"):
mask = instruction.split(" ")[2]
elif instruction.startswith("mem"):
idx = int(instruction.split("[")[1].split("]")[0])
val = int(instruction.split(" ")[2])
idx_mask = ""
# pad with 0s (up to 36) the index
for m, i in zip(mask, f"{idx:036b}"):
if m == "0":
# do not change the bit value
idx_mask += i
elif m == "1" or m == "X":
idx_mask += m
idxs = get_indexes(idx_mask)
for idx in idxs:
memory[idx] = val
values_in_memory = sum([val for val in memory.values()])
print(f"The sum of all values in memory is {values_in_memory}")
if __name__ == "__main__":
part_1()
part_2()

107
src/2020/P15.py Normal file
View File

@ -0,0 +1,107 @@
# --- Day 15: Rambunctious Recitation ---
# You catch the airport shuttle and try to book a new flight to your vacation
# island. Due to the storm, all direct flights have been cancelled, but a route
# is available to get around the storm. You take it.
# While you wait for your flight, you decide to check in with the Elves back at
# the North Pole. They're playing a memory game and are ever so excited to
# explain the rules!
# In this game, the players take turns saying numbers. They begin by taking
# turns reading from a list of starting numbers (your puzzle input). Then, each
# turn consists of considering the most recently spoken number:
# If that was the first time the number has been spoken, the current player
# says 0.
# Otherwise, the number had been spoken before; the current player
# announces how many turns apart the number is from when it was previously
# spoken.
# So, after the starting numbers, each turn results in that player speaking
# aloud either 0 (if the last number is new) or an age (if the last number is a
# repeat).
# For example, suppose the starting numbers are 0,3,6:
# Turn 1: The 1st number spoken is a starting number, 0.
# Turn 2: The 2nd number spoken is a starting number, 3.
# Turn 3: The 3rd number spoken is a starting number, 6.
# Turn 4: Now, consider the last number spoken, 6. Since that was the first
# time the number had been spoken, the 4th number spoken is 0.
# Turn 5: Next, again consider the last number spoken, 0. Since it had been
# spoken before, the next number to speak is the difference between the turn
# number when it was last spoken (the previous turn, 4) and the turn number of
# the time it was most recently spoken before then (turn 1). Thus, the 5th
# number spoken is 4 - 1, 3.
# Turn 6: The last number spoken, 3 had also been spoken before, most
# recently on turns 5 and 2. So, the 6th number spoken is 5 - 2, 3.
# Turn 7: Since 3 was just spoken twice in a row, and the last two turns
# are 1 turn apart, the 7th number spoken is 1.
# Turn 8: Since 1 is new, the 8th number spoken is 0.
# Turn 9: 0 was last spoken on turns 8 and 4, so the 9th number spoken is
# the difference between them, 4.
# Turn 10: 4 is new, so the 10th number spoken is 0.
# (The game ends when the Elves get sick of playing or dinner is ready,
# whichever comes first.)
# Their question for you is: what will be the 2020th number spoken? In the
# example above, the 2020th number spoken will be 436.
# Here are a few more examples:
# Given the starting numbers 1,3,2, the 2020th number spoken is 1.
# Given the starting numbers 2,1,3, the 2020th number spoken is 10.
# Given the starting numbers 1,2,3, the 2020th number spoken is 27.
# Given the starting numbers 2,3,1, the 2020th number spoken is 78.
# Given the starting numbers 3,2,1, the 2020th number spoken is 438.
# Given the starting numbers 3,1,2, the 2020th number spoken is 1836.
# Given your starting numbers, what will be the 2020th number spoken?
from collections import defaultdict
with open("files/P15.txt", "r") as f:
sequence = [int(val) for val in f.read().strip().split(",")]
numbers = defaultdict(list)
for idx, number in enumerate(sequence):
numbers[number].append(idx)
def part_1_and_2(num: int) -> None:
last = 0 # list(numbers.keys())[-1].copy()
for i in range(len(sequence), num):
if len(numbers[last]) < 2:
numbers[0].append(i)
last = 0
else:
last = numbers[last][-1] - numbers[last][-2]
numbers[last].append(i)
# because of indexing starts at 0
if i == 2019:
print(f"The {i+1}th number spoken is {last}")
print(f"The {num}th number spoken is {last}")
# --- Part Two ---
# Impressed, the Elves issue you a challenge: determine the 30000000th number
# spoken. For example, given the same starting numbers as above:
# Given 0,3,6, the 30000000th number spoken is 175594.
# Given 1,3,2, the 30000000th number spoken is 2578.
# Given 2,1,3, the 30000000th number spoken is 3544142.
# Given 1,2,3, the 30000000th number spoken is 261214.
# Given 2,3,1, the 30000000th number spoken is 6895259.
# Given 3,2,1, the 30000000th number spoken is 18.
# Given 3,1,2, the 30000000th number spoken is 362.
# Given your starting numbers, what will be the 30000000th number spoken?
if __name__ == "__main__":
part_1_and_2(30_000_000)

245
src/2020/P16.py Normal file
View File

@ -0,0 +1,245 @@
# --- Day 16: Ticket Translation ---
# As you're walking to yet another connecting flight, you realize that one of
# the legs of your re-routed trip coming up is on a high-speed train. However,
# the train ticket you were given is in a language you don't understand. You
# should probably figure out what it says before you get to the train station
# after the next flight.
# Unfortunately, you can't actually read the words on the ticket. You can,
# however, read the numbers, and so you figure out the fields these tickets
# must have and the valid ranges for values in those fields.
# You collect the rules for ticket fields, the numbers on your ticket, and the
# numbers on other nearby tickets for the same train service (via the airport
# security cameras) together into a single document you can reference (your
# puzzle input).
# The rules for ticket fields specify a list of fields that exist somewhere on
# the ticket and the valid ranges of values for each field. For example, a rule
# like class: 1-3 or 5-7 means that one of the fields in every ticket is named
# class and can be any value in the ranges 1-3 or 5-7 (inclusive, such that 3
# and 5 are both valid in this field, but 4 is not).
# Each ticket is represented by a single line of comma-separated values. The
# values are the numbers on the ticket in the order they appear; every ticket
# has the same format. For example, consider this ticket:
# .--------------------------------------------------------.
# | ????: 101 ?????: 102 ??????????: 103 ???: 104 |
# | |
# | ??: 301 ??: 302 ???????: 303 ??????? |
# | ??: 401 ??: 402 ???? ????: 403 ????????? |
# '--------------------------------------------------------'
# Here, ? represents text in a language you don't understand. This ticket might
# be represented as 101,102,103,104,301,302,303,401,402,403; of course, the
# actual train tickets you're looking at are much more complicated. In any
# case, you've extracted just the numbers in such a way that the first number
# is always the same specific field, the second number is always a different
# specific field, and so on - you just don't know what each position actually
# means!
# Start by determining which tickets are completely invalid; these are tickets
# that contain values which aren't valid for any field. Ignore your ticket for
# now.
# For example, suppose you have the following notes:
# class: 1-3 or 5-7
# row: 6-11 or 33-44
# seat: 13-40 or 45-46
# your ticket:
# 7,1,14
# nearby tickets:
# 7,3,47
# 40,4,50
# 55,2,20
# 38,6,12
# It doesn't matter which position corresponds to which field; you can identify
# invalid nearby tickets by considering only whether tickets contain values
# that are not valid for any field. In this example, the values on the first
# nearby ticket are all valid for at least one field. This is not true of the
# other three nearby tickets: the values 4, 55, and 12 are are not valid for
# any field. Adding together all of the invalid values produces your ticket
# scanning error rate: 4 + 55 + 12 = 71.
# Consider the validity of the nearby tickets you scanned. What is your ticket
# scanning error rate?
from typing import Set
with open("files/P16.txt", "r") as f:
rules_raw, my_ticket, nearby_tickets = [
f.split("\n") for f in f.read().strip().split("\n\n")
]
def part_1() -> None:
rules = []
for rule in rules_raw:
name = rule.split(": ")[0]
valid_numbers = set()
for range_numbers in rule.split(": ")[1].split(" or "):
numbers = [int(number) for number in range_numbers.split("-")]
first, last = range(*numbers).start, range(*numbers).stop
list_numbers = list(range(first, last + 1))
for number in list_numbers:
valid_numbers.add(number)
rules.append([name, valid_numbers])
# Create a single set with all rules
all_rules = set()
for rule in rules:
all_rules |= rule[1]
all_tickets = [list(map(int, o.split(","))) for o in nearby_tickets[1:]]
ticket_scanning_error_rate = sum(
[
ticket
for ticket_numbers in all_tickets
for ticket in ticket_numbers
if ticket not in all_rules
]
)
print(f"The ticket scanning error rate is {ticket_scanning_error_rate}")
# --- Part Two ---
# Now that you've identified which tickets contain invalid values, discard
# those tickets entirely. Use the remaining valid tickets to determine which
# field is which.
# Using the valid ranges for each field, determine what order the fields appear
# on the tickets. The order is consistent between all tickets: if seat is the
# third field, it is the third field on every ticket, including your ticket.
# For example, suppose you have the following notes:
# class: 0-1 or 4-19
# row: 0-5 or 8-19
# seat: 0-13 or 16-19
# your ticket:
# 11,12,13
# nearby tickets:
# 3,9,18
# 15,1,5
# 5,14,9
# Based on the nearby tickets in the above example, the first position must be
# row, the second position must be class, and the third position must be seat;
# you can conclude that in your ticket, class is 12, row is 11, and seat is 13.
# Once you work out which field is which, look for the six fields on your
# ticket that start with the word departure. What do you get if you multiply
# those six values together?
def from_part_1():
# from part_1
rules = []
for rule in rules_raw:
name = rule.split(": ")[0]
valid_numbers = set()
for range_numbers in rule.split(": ")[1].split(" or "):
numbers = [int(number) for number in range_numbers.split("-")]
first, last = range(*numbers).start, range(*numbers).stop
list_numbers = list(range(first, last + 1))
for number in list_numbers:
valid_numbers.add(number)
rules.append([name, valid_numbers])
all_rules = set()
for rule in rules:
all_rules |= rule[1]
return rules, all_rules
def remove_invalid(all_rules):
valid_tickets = []
for line in nearby_tickets[1:]:
valid = True
for ticket in [int(t) for t in line.split(",")]:
if ticket not in all_rules:
valid = False
break
if valid:
valid_tickets.append(line)
return valid_tickets
def check_validity(rules, ticket_values):
# check validity of sets
possibles = []
for c in rules:
possibles.append([c[0], []])
for idx, ticket in enumerate(ticket_values):
valid = True
for value in ticket:
if value not in c[1]:
valid = False
break
if valid:
possibles[-1][1].append(idx)
return possibles
def get_ordered_fields(sorted_possibles):
# get each field and its respective order
ordered_fields = []
for idx, (field, values) in enumerate(sorted_possibles):
# first field
if len(values) == 1:
ordered_fields.append([field, values[0]])
else:
value = [
v for v in values if v not in sorted_possibles[idx - 1][1]
][0]
ordered_fields.append([field, value])
return ordered_fields
def part_2() -> None:
rules, all_rules = from_part_1()
valid_tickets = remove_invalid(all_rules)
# collect 20 sets of all respective values
ticket_values = [set() for x in range(len(rules))]
for line in valid_tickets:
index = 0
for element in line.split(","):
ticket_values[index].add(int(element))
index += 1
possibles = check_validity(rules, ticket_values)
# sort possibles by the length of values each set holds
sorted_possibles = sorted(possibles, key=lambda l: (len(l[1]), l))
sorted_fields = get_ordered_fields(sorted_possibles)
# parse "my ticket"
myticket = [
int(v) for elements in my_ticket[1:] for v in elements.split(",")
]
res = 1
for (field, idx) in sorted_fields:
if field.startswith("departure"):
res *= myticket[idx]
print(f"The final result is {res}")
if __name__ == "__main__":
part_1()
part_2()

97
src/2020/P2.py Normal file
View File

@ -0,0 +1,97 @@
# --- Day 2: Password Philosophy ---
# Your flight departs in a few days from the coastal airport; the easiest way
# down to the coast from here is via toboggan.
# The shopkeeper at the North Pole Toboggan Rental Shop is having a bad day.
# "Something's wrong with our computers; we can't log in!" You ask if you can
# take a look.
# Their password database seems to be a little corrupted: some of the passwords
# wouldn't have been allowed by the Official Toboggan Corporate Policy that was
# in effect when they were chosen.
# To try to debug the problem, they have created a list (your puzzle input) of
# passwords (according to the corrupted database) and the corporate policy when
# that password was set.
# For example, suppose you have the following list:
# 1-3 a: abcde
# 1-3 b: cdefg
# 2-9 c: ccccccccc
# Each line gives the password policy and then the password. The password
# policy indicates the lowest and highest number of times a given letter must
# appear for the password to be valid. For example, 1-3 a means that the
# password must contain a at least 1 time and at most 3 times.
# In the above example, 2 passwords are valid. The middle password, cdefg, is
# not; it contains no instances of b, but needs at least 1. The first and third
# passwords are valid: they contain one a or nine c, both within the limits of
# their respective policies.
# How many passwords are valid according to their policies?
with open("files/P2.txt", "r") as f:
passwds = [line.split() for line in f.read().strip().split("\n")]
def part_1() -> None:
correct_passwds = 0
for passwd in passwds:
min_, max_ = passwd[0].split("-")
if passwd[2].count(passwd[1][:-1]) >= int(min_) and passwd[2].count(
passwd[1][:-1]
) <= int(max_):
correct_passwds += 1
print(f"There are {correct_passwds} valid passwords in the database")
# --- Part Two ---
# While it appears you validated the passwords correctly, they don't seem to be
# what the Official Toboggan Corporate Authentication System is expecting.
# The shopkeeper suddenly realizes that he just accidentally explained the
# password policy rules from his old job at the sled rental place down the
# street! The Official Toboggan Corporate Policy actually works a little
# differently.
# Each policy actually describes two positions in the password, where 1 means
# the first character, 2 means the second character, and so on. (Be careful;
# Toboggan Corporate Policies have no concept of "index zero"!) Exactly one of
# these positions must contain the given letter. Other occurrences of the
# letter are irrelevant for the purposes of policy enforcement.
# Given the same example list from above:
# 1-3 a: abcde is valid: position 1 contains a and position 3 does not.
# 1-3 b: cdefg is invalid: neither position 1 nor position 3 contains b.
# 2-9 c: ccccccccc is invalid: both position 2 and position 9 contain c.
# How many passwords are valid according to the new interpretation of the
# policies?
def part_2() -> None:
correct_passwds = 0
for passwd in passwds:
pos1, pos2 = passwd[0].split("-")
checks = 0
if passwd[2][int(pos1) - 1] == passwd[1][:-1]:
checks += 1
if passwd[2][int(pos2) - 1] == passwd[1][:-1]:
checks += 1
if checks == 1:
correct_passwds += 1
print(f"There are {correct_passwds} valid passwords in the database")
if __name__ == "__main__":
part_1()
part_2()

171
src/2020/P3.py Normal file
View File

@ -0,0 +1,171 @@
# --- Day 3: Toboggan Trajectory ---
# With the toboggan login problems resolved, you set off toward the airport.
# While travel by toboggan might be easy, it's certainly not safe: there's very
# minimal steering and the area is covered in trees. You'll need to see which
# angles will take you near the fewest trees.
# Due to the local geology, trees in this area only grow on exact integer
# coordinates in a grid. You make a map (your puzzle input) of the open squares
# (.) and trees (#) you can see. For example:
# ..##.......
# #...#...#..
# .#....#..#.
# ..#.#...#.#
# .#...##..#.
# ..#.##.....
# .#.#.#....#
# .#........#
# #.##...#...
# #...##....#
# .#..#...#.#
# These aren't the only trees, though; due to something you read about once
# involving arboreal genetics and biome stability, the same pattern repeats to
# the right many times:
# ..##.........##.........##.........##.........##.........##....... --->
# #...#...#..#...#...#..#...#...#..#...#...#..#...#...#..#...#...#..
# .#....#..#..#....#..#..#....#..#..#....#..#..#....#..#..#....#..#.
# ..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#
# .#...##..#..#...##..#..#...##..#..#...##..#..#...##..#..#...##..#.
# ..#.##.......#.##.......#.##.......#.##.......#.##.......#.##..... --->
# .#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#
# .#........#.#........#.#........#.#........#.#........#.#........#
# #.##...#...#.##...#...#.##...#...#.##...#...#.##...#...#.##...#...
# #...##....##...##....##...##....##...##....##...##....##...##....#
# .#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.#.#..#...#.# --->
# You start on the open square (.) in the top-left corner and need to reach the
# bottom (below the bottom-most row on your map).
# The toboggan can only follow a few specific slopes (you opted for a cheaper
# model that prefers rational numbers); start by counting all the trees you
# would encounter for the slope right 3, down 1:
# From your starting position at the top-left, check the position that is right
# 3 and down 1. Then, check the position that is right 3 and down 1 from there,
# and so on until you go past the bottom of the map.
# The locations you'd check in the above example are marked here with O where
# there was an open square and X where there was a tree:
# ..##.........##.........##.........##.........##.........##....... --->
# #..O#...#..#...#...#..#...#...#..#...#...#..#...#...#..#...#...#..
# .#....X..#..#....#..#..#....#..#..#....#..#..#....#..#..#....#..#.
# ..#.#...#O#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#..#.#...#.#
# .#...##..#..X...##..#..#...##..#..#...##..#..#...##..#..#...##..#.
# ..#.##.......#.X#.......#.##.......#.##.......#.##.......#.##..... --->
# .#.#.#....#.#.#.#.O..#.#.#.#....#.#.#.#....#.#.#.#....#.#.#.#....#
# .#........#.#........X.#........#.#........#.#........#.#........#
# #.##...#...#.##...#...#.X#...#...#.##...#...#.##...#...#.##...#...
# #...##....##...##....##...#X....##...##....##...##....##...##....#
# .#..#...#.#.#..#...#.#.#..#...X.#.#..#...#.#.#..#...#.#.#..#...#.# --->
# In this example, traversing the map using this slope would cause you to
# encounter 7 trees.
# Starting at the top-left corner of your map and following a slope of right 3
# and down 1, how many trees would you encounter?
with open("files/P3.txt", "r") as f:
forest = [line.split() for line in f.read().strip().split("\n")]
def part_1() -> None:
trees_found, pos = 0, 0
for idx, line in enumerate(forest):
extended_line = ",".join(line * 32).replace(",", "")
if extended_line[pos] == "#":
trees_found += 1
pos += 3
print(f"We found {trees_found} trees in our way")
# --- Part Two ---
# Time to check the rest of the slopes - you need to minimize the probability
# of a sudden arboreal stop, after all.
# Determine the number of trees you would encounter if, for each of the
# following slopes, you start at the top-left corner and traverse the map all
# the way to the bottom:
# Right 1, down 1.
# Right 3, down 1. (This is the slope you already checked.)
# Right 5, down 1.
# Right 7, down 1.
# Right 1, down 2.
# In the above example, these slopes would find 2, 7, 3, 4, and 2 tree(s)
# respectively; multiplied together, these produce the answer 336.
# What do you get if you multiply together the number of trees encountered on
# each of the listed slopes?
def part_2() -> None:
pos = 0
trees_first = 0
# first slope: right 1, down 1
for idx, line in enumerate(forest):
extended_line = ",".join(line * 11).replace(",", "")
if extended_line[pos] == "#":
trees_first += 1
pos += 1
# reset pos
pos = 0
trees_second = 0
# second slope: right 3, down 1
for idx, line in enumerate(forest):
extended_line = ",".join(line * 32).replace(",", "")
if extended_line[pos] == "#":
trees_second += 1
pos += 3
# reset pos
pos = 0
trees_third = 0
# third slope: right 5, down 1
for idx, line in enumerate(forest):
extended_line = ",".join(line * 55).replace(",", "")
if extended_line[pos] == "#":
trees_third += 1
pos += 5
# reset pos
pos = 0
trees_fourth = 0
# fourth slope: right 7, down 1
for idx, line in enumerate(forest):
extended_line = ",".join(line * 77).replace(",", "")
if extended_line[pos] == "#":
trees_fourth += 1
pos += 7
# reset pos
pos = 0
trees_fifth = 0
# fifth slope: right 1, down 2
for idx, line in enumerate(forest):
if idx % 2 == 0:
# break
extended_line = ",".join(line * 6).replace(",", "")
if extended_line[pos] == "#":
trees_fifth += 1
pos += 1
total_trees = (
trees_first * trees_second * trees_third * trees_fourth * trees_fifth
)
print(f"We found {total_trees} trees in our way")
if __name__ == "__main__":
part_1()
part_2()

228
src/2020/P4.py Normal file
View File

@ -0,0 +1,228 @@
# --- Day 4: Passport Processing ---
# You arrive at the airport only to realize that you grabbed your North Pole
# Credentials instead of your passport. While these documents are extremely
# similar, North Pole Credentials aren't issued by a country and therefore
# aren't actually valid documentation for travel in most of the world.
# It seems like you're not the only one having problems, though; a very long
# line has formed for the automatic passport scanners, and the delay could
# upset your travel itinerary.
# Due to some questionable network security, you realize you might be able to
# solve both of these problems at the same time.
# The automatic passport scanners are slow because they're having trouble
# detecting which passports have all required fields. The expected fields are
# as follows:
# byr (Birth Year)
# iyr (Issue Year)
# eyr (Expiration Year)
# hgt (Height)
# hcl (Hair Color)
# ecl (Eye Color)
# pid (Passport ID)
# cid (Country ID)
# Passport data is validated in batch files (your puzzle input). Each passport
# is represented as a sequence of key:value pairs separated by spaces or
# newlines. Passports are separated by blank lines.
# Here is an example batch file containing four passports:
# ecl:gry pid:860033327 eyr:2020 hcl:#fffffd
# byr:1937 iyr:2017 cid:147 hgt:183cm
# iyr:2013 ecl:amb cid:350 eyr:2023 pid:028048884
# hcl:#cfa07d byr:1929
# hcl:#ae17e1 iyr:2013
# eyr:2024
# ecl:brn pid:760753108 byr:1931
# hgt:179cm
# hcl:#cfa07d eyr:2025 pid:166559648
# iyr:2011 ecl:brn hgt:59in
# The first passport is valid - all eight fields are present. The second
# passport is invalid - it is missing hgt (the Height field).
# The third passport is interesting; the only missing field is cid, so it looks
# like data from North Pole Credentials, not a passport at all! Surely, nobody
# would mind if you made the system temporarily ignore missing cid fields.
# Treat this "passport" as valid.
# The fourth passport is missing two fields, cid and byr. Missing cid is fine,
# but missing any other field is not, so this passport is invalid.
# According to the above rules, your improved system would report 2 valid
# passports.
# Count the number of valid passports - those that have all required fields.
# Treat cid as optional. In your batch file, how many passports are valid?
with open("files/P4.txt", "r") as f:
passports = [line.split() for line in f.read().strip().split("\n\n")]
def part_1() -> None:
valid_passports = 0
for passport in passports:
if len(passport) > 7:
valid_passports += 1
if len(passport) == 7:
valid_fields = 0
for field in passport:
if "cid" not in field:
valid_fields += 1
if valid_fields == 7:
valid_passports += 1
print(f"There are {valid_passports} valid passports")
# --- Part Two ---
# The line is moving more quickly now, but you overhear airport security
# talking about how passports with invalid data are getting through. Better add
# some data validation, quick!
# You can continue to ignore the cid field, but each other field has strict
# rules about what values are valid for automatic validation:
# byr (Birth Year) - four digits; at least 1920 and at most 2002.
# iyr (Issue Year) - four digits; at least 2010 and at most 2020.
# eyr (Expiration Year) - four digits; at least 2020 and at most 2030.
# hgt (Height) - a number followed by either cm or in:
# If cm, the number must be at least 150 and at most 193.
# If in, the number must be at least 59 and at most 76.
# hcl (Hair Color) - a # followed by exactly six characters 0-9 or a-f.
# ecl (Eye Color) - exactly one of: amb blu brn gry grn hzl oth.
# pid (Passport ID) - a nine-digit number, including leading zeroes.
# cid (Country ID) - ignored, missing or not.
# Your job is to count the passports where all required fields are both present
# and valid according to the above rules. Here are some example values:
# byr valid: 2002
# byr invalid: 2003
# hgt valid: 60in
# hgt valid: 190cm
# hgt invalid: 190in
# hgt invalid: 190
# hcl valid: #123abc
# hcl invalid: #123abz
# hcl invalid: 123abc
# ecl valid: brn
# ecl invalid: wat
# pid valid: 000000001
# pid invalid: 0123456789
# Here are some invalid passports:
# eyr:1972 cid:100
# hcl:#18171d ecl:amb hgt:170 pid:186cm iyr:2018 byr:1926
# iyr:2019
# hcl:#602927 eyr:1967 hgt:170cm
# ecl:grn pid:012533040 byr:1946
# hcl:dab227 iyr:2012
# ecl:brn hgt:182cm pid:021572410 eyr:2020 byr:1992 cid:277
# hgt:59cm ecl:zzz
# eyr:2038 hcl:74454a iyr:2023
# pid:3556412378 byr:2007
# Here are some valid passports:
# pid:087499704 hgt:74in ecl:grn iyr:2012 eyr:2030 byr:1980
# hcl:#623a2f
# eyr:2029 ecl:blu cid:129 byr:1989
# iyr:2014 pid:896056539 hcl:#a97842 hgt:165cm
# hcl:#888785
# hgt:164cm byr:2001 iyr:2015 cid:88
# pid:545766238 ecl:hzl
# eyr:2022
# iyr:2010 hgt:158cm hcl:#b6652a ecl:blu byr:1944 eyr:2021 pid:093154719
# Count the number of valid passports - those that have all required fields and
# valid values. Continue to treat cid as optional. In your batch file, how many
# passports are valid?
def is_valid(passport: dict[str, str]) -> bool:
keys = ["byr", "iyr", "eyr", "hgt", "hcl", "ecl", "pid"]
for key in keys:
if key not in passport:
return False
if not any([passport[key] != 4 for key in ["byr", "iyr", "eyr"]]):
return False
if passport["byr"] < "1920" or passport["byr"] > "2002":
return False
if passport["iyr"] < "2010" or passport["iyr"] > "2020":
return False
if passport["eyr"] < "2020" or passport["eyr"] > "2030":
return False
if not any(["cm" in passport["hgt"], "in" in passport["hgt"]]):
return False
_hgt = int(passport["hgt"][:-2])
if "cm" in passport["hgt"]:
if _hgt < 150 or _hgt > 193:
return False
if "in" in passport["hgt"]:
if _hgt < 59 or _hgt > 76:
return False
if "#" not in passport["hcl"]:
return False
_hcl = passport["hcl"].split("#")[-1]
if len(_hcl) != 6:
return False
try:
int(_hcl, 16)
except ValueError:
return False
if not any(
[
passport["ecl"]
in [
"amb",
"blu",
"brn",
"gry",
"grn",
"hzl",
"oth",
]
]
):
return False
if len(passport["pid"]) != 9:
return False
return True
def part_2() -> None:
valid_passports = 0
for passport in passports:
_items: list[list[str]] = [
item.split(":") for item in passport if item
]
passport_dict: dict[str, str] = dict(_items)
if is_valid(passport_dict):
valid_passports += 1
print(f"There are {valid_passports} valid passports")
if __name__ == "__main__":
part_1()
part_2()

128
src/2020/P5.py Normal file
View File

@ -0,0 +1,128 @@
# --- Day 5: Binary Boarding ---
# You board your plane only to discover a new problem: you dropped your
# boarding pass! You aren't sure which seat is yours, and all of the flight
# attendants are busy with the flood of people that suddenly made it through
# passport control.
# You write a quick program to use your phone's camera to scan all of the
# nearby boarding passes (your puzzle input); perhaps you can find your seat
# through process of elimination.
# Instead of zones or groups, this airline uses binary space partitioning to
# seat people. A seat might be specified like FBFBBFFRLR, where F means
# "front", B means "back", L means "left", and R means "right".
# The first 7 characters will either be F or B; these specify exactly one of
# the 128 rows on the plane (numbered 0 through 127). Each letter tells you
# which half of a region the given seat is in. Start with the whole list of
# rows; the first letter indicates whether the seat is in the front (0 through
# 63) or the back (64 through 127). The next letter indicates which half of
# that region the seat is in, and so on until you're left with exactly one row.
# For example, consider just the first seven characters of FBFBBFFRLR:
# Start by considering the whole range, rows 0 through 127.
# F means to take the lower half, keeping rows 0 through 63.
# B means to take the upper half, keeping rows 32 through 63.
# F means to take the lower half, keeping rows 32 through 47.
# B means to take the upper half, keeping rows 40 through 47.
# B keeps rows 44 through 47.
# F keeps rows 44 through 45.
# The final F keeps the lower of the two, row 44.
# The last three characters will be either L or R; these specify exactly one of
# the 8 columns of seats on the plane (numbered 0 through 7). The same process
# as above proceeds again, this time with only three steps. L means to keep the
# lower half, while R means to keep the upper half.
# For example, consider just the last 3 characters of FBFBBFFRLR:
# Start by considering the whole range, columns 0 through 7.
# R means to take the upper half, keeping columns 4 through 7.
# L means to take the lower half, keeping columns 4 through 5.
# The final R keeps the upper of the two, column 5.
# So, decoding FBFBBFFRLR reveals that it is the seat at row 44, column 5.
# Every seat also has a unique seat ID: multiply the row by 8, then add the
# column. In this example, the seat has ID 44 * 8 + 5 = 357.
# Here are some other boarding passes:
# BFFFBBFRRR: row 70, column 7, seat ID 567.
# FFFBBBFRRR: row 14, column 7, seat ID 119.
# BBFFBBFRLL: row 102, column 4, seat ID 820.
# As a sanity check, look through your list of boarding passes. What is the
# highest seat ID on a boarding pass?
with open("files/P5.txt", "r") as f:
boarding_passes = [code for code in f.read().strip().split("\n")]
def binary_search(
arr: str, upper_limit: int, var_lower: str, var_upper: str
) -> int:
range_l = 0
range_h = upper_limit
range_m = 0
for char in arr:
range_m = (range_h + range_l) // 2
if char == var_lower:
range_h = range_m
elif char == var_upper:
range_l = range_m + 1
return int(range_l)
def part_1() -> None:
seat_ID: int = 0
for code in boarding_passes:
row, col = code[:7], code[-3:]
_row = binary_search(row, 127, "F", "B")
_col = binary_search(col, 7, "L", "R")
_seat_ID: int = _row * 8 + _col
seat_ID = max(seat_ID, _seat_ID)
print(f"The highest seat ID on a boarding pass is {seat_ID}")
# --- Part Two ---
# Ding! The "fasten seat belt" signs have turned on. Time to find your seat.
# It's a completely full flight, so your seat should be the only missing
# boarding pass in your list. However, there's a catch: some of the seats at
# the very front and back of the plane don't exist on this aircraft, so they'll
# be missing from your list as well.
# Your seat wasn't at the very front or back, though; the seats with IDs +1 and
# -1 from yours will be in your list.
# What is the ID of your seat?
def part_2() -> None:
seat_IDs: list[int] = []
missing_seats: list[int] = []
for code in boarding_passes:
row, col = code[:7], code[-3:]
_row = binary_search(row, 127, "F", "B")
_col = binary_search(col, 7, "L", "R")
_seat_ID: int = _row * 8 + _col
seat_IDs.append(_seat_ID)
for ID in range(len(boarding_passes)):
if ID in seat_IDs:
pass
else:
missing_seats.append(ID)
print(f"The ID of my seat is {missing_seats[-1]}")
if __name__ == "__main__":
part_1()
part_2()

138
src/2020/P6.py Normal file
View File

@ -0,0 +1,138 @@
# --- Day 6: Custom Customs ---
# As your flight approaches the regional airport where you'll switch to a much
# larger plane, customs declaration forms are distributed to the passengers.
# The form asks a series of 26 yes-or-no questions marked a through z. All you
# need to do is identify the questions for which anyone in your group answers
# "yes". Since your group is just you, this doesn't take very long.
# However, the person sitting next to you seems to be experiencing a language
# barrier and asks if you can help. For each of the people in their group, you
# write down the questions for which they answer "yes", one per line. For
# example:
# abcx
# abcy
# abcz
# In this group, there are 6 questions to which anyone answered "yes": a, b, c,
# x, y, and z. (Duplicate answers to the same question don't count extra; each
# question counts at most once.)
# Another group asks for your help, then another, and eventually you've
# collected answers from every group on the plane (your puzzle input). Each
# group's answers are separated by a blank line, and within each group, each
# person's answers are on a single line. For example:
# abc
# a
# b
# c
# ab
# ac
# a
# a
# a
# a
# b
# This list represents answers from five groups:
# The first group contains one person who answered "yes" to 3 questions: a,
# b, and c.
# The second group contains three people; combined, they answered "yes" to
# 3 questions: a, b, and c.
# The third group contains two people; combined, they answered "yes" to 3
# questions: a, b, and c.
# The fourth group contains four people; combined, they answered "yes" to
# only 1 question, a.
# The last group contains one person who answered "yes" to only 1 question,
# b.
# In this example, the sum of these counts is 3 + 3 + 3 + 1 + 1 = 11.
# For each group, count the number of questions to which anyone answered "yes".
# What is the sum of those counts?
with open("files/P6.txt", "r") as f:
answers_groups = [line.split() for line in f.read().strip().split("\n\n")]
def part_1() -> None:
counts: int = 0
for answers_group in answers_groups:
yes = len(
set(
[
answer
for individual_answers in answers_group
for answer in individual_answers
]
)
)
counts += yes
print(f"The sum of counts is {counts}")
# --- Part Two ---
# As you finish the last group's customs declaration, you notice that you
# misread one word in the instructions:
# You don't need to identify the questions to which anyone answered "yes"; you
# need to identify the questions to which everyone answered "yes"!
# Using the same example as above:
# abc
# a
# b
# c
# ab
# ac
# a
# a
# a
# a
# b
# This list represents answers from five groups:
# In the first group, everyone (all 1 person) answered "yes" to 3
# questions: a, b, and c.
# In the second group, there is no question to which everyone answered
# "yes".
# In the third group, everyone answered yes to only 1 question, a. Since
# some people did not answer "yes" to b or c, they don't count.
# In the fourth group, everyone answered yes to only 1 question, a.
# In the fifth group, everyone (all 1 person) answered "yes" to 1 question,
# b.
# In this example, the sum of these counts is 3 + 0 + 1 + 1 + 1 = 6.
# For each group, count the number of questions to which everyone answered
# "yes". What is the sum of those counts?
def part_2() -> None:
counts: int = 0
for answers_group in answers_groups:
yes = len(set.intersection(*map(set, answers_group)))
counts += yes
print(f"The sum of counts is {counts}")
if __name__ == "__main__":
part_1()
part_2()

168
src/2020/P7.py Normal file
View File

@ -0,0 +1,168 @@
from typing import Dict
# --- Day 7: Handy Haversacks ---
# You land at the regional airport in time for your next flight. In fact, it
# looks like you'll even have time to grab some food: all flights are currently
# delayed due to issues in luggage processing.
# Due to recent aviation regulations, many rules (your puzzle input) are being
# enforced about bags and their contents; bags must be color-coded and must
# contain specific quantities of other color-coded bags. Apparently, nobody
# responsible for these regulations considered how long they would take to
# enforce!
# For example, consider the following rules:
# light red bags contain 1 bright white bag, 2 muted yellow bags.
# dark orange bags contain 3 bright white bags, 4 muted yellow bags.
# bright white bags contain 1 shiny gold bag.
# muted yellow bags contain 2 shiny gold bags, 9 faded blue bags.
# shiny gold bags contain 1 dark olive bag, 2 vibrant plum bags.
# dark olive bags contain 3 faded blue bags, 4 dotted black bags.
# vibrant plum bags contain 5 faded blue bags, 6 dotted black bags.
# faded blue bags contain no other bags.
# dotted black bags contain no other bags.
# These rules specify the required contents for 9 bag types. In this example,
# every faded blue bag is empty, every vibrant plum bag contains 11 bags (5
# faded blue and 6 dotted black), and so on.
# You have a shiny gold bag. If you wanted to carry it in at least one other
# bag, how many different bag colors would be valid for the outermost bag? (In
# other words: how many colors can, eventually, contain at least one shiny gold
# bag?)
# In the above rules, the following options would be available to you:
# A bright white bag, which can hold your shiny gold bag directly.
# A muted yellow bag, which can hold your shiny gold bag directly, plus
# some other bags.
# A dark orange bag, which can hold bright white and muted yellow bags,
# either of which could then hold your shiny gold bag.
# A light red bag, which can hold bright white and muted yellow bags,
# either of which could then hold your shiny gold bag.
# So, in this example, the number of bag colors that can eventually contain at
# least one shiny gold bag is 4.
# How many bag colors can eventually contain at least one shiny gold bag? (The
# list of rules is quite long; make sure you get all of it.)
with open("files/P7.txt", "r") as f:
lines = [code for code in f.read().strip().split("\n")]
# to make a dictionary of bags
bag_types = []
all_bags: Dict[str, str] = {}
for line in lines:
main_bag = line.split(" bags contain ")[0]
# get a string with the content of each bag
contains = line.split(" bags contain ")[1:][0]
# house keeping
each_contain = contains.split(",")
each_contain = [cnt.lstrip() for cnt in each_contain]
# get a list of strings with the content of each bag
each_contain = [" ".join(cont.split(" ")[:-1]) for cont in each_contain]
# get a dictionary with bags as keys and number of them as values
each_contain = {
" ".join(cont.split(" ")[1:]): cont.split(" ")[0]
for cont in each_contain
}
if main_bag not in bag_types:
bag_types.append(main_bag)
if all_bags.get(main_bag):
each_contain.update(all_bags[main_bag])
all_bags[main_bag] = each_contain
def check_bag(bags: Dict[str, str], my_bag: str, current_bag: str) -> int:
if current_bag == my_bag:
return 1
if bags.get(current_bag) is None:
return 0
else:
counts = []
for k, v in bags[current_bag].items():
counts.append(check_bag(bags, my_bag, k))
return max(counts)
def part_1() -> None:
found_bags = 0
my_bag = "shiny gold"
for k, v in all_bags.items():
if k != my_bag:
found_bags += check_bag(all_bags, my_bag, k)
print(f"{found_bags} bags can contain a {my_bag} bag.")
# --- Part Two ---
# It's getting pretty expensive to fly these days - not because of ticket
# prices, but because of the ridiculous number of bags you need to buy!
# Consider again your shiny gold bag and the rules from the above example:
# faded blue bags contain 0 other bags.
# dotted black bags contain 0 other bags.
# vibrant plum bags contain 11 other bags: 5 faded blue bags and 6 dotted
# black bags.
# dark olive bags contain 7 other bags: 3 faded blue bags and 4 dotted
# black bags.
# So, a single shiny gold bag must contain 1 dark olive bag (and the 7 bags
# within it) plus 2 vibrant plum bags (and the 11 bags within each of those):
# 1 + 1*7 + 2 + 2*11 = 32 bags!
# Of course, the actual rules have a small chance of going several levels
# deeper than this example; be sure to count all of the bags, even if the
# nesting becomes topologically impractical!
# Here's another example:
# shiny gold bags contain 2 dark red bags.
# dark red bags contain 2 dark orange bags.
# dark orange bags contain 2 dark yellow bags.
# dark yellow bags contain 2 dark green bags.
# dark green bags contain 2 dark blue bags.
# dark blue bags contain 2 dark violet bags.
# dark violet bags contain no other bags.
# In this example, a single shiny gold bag must contain 126 other bags.
# How many individual bags are required inside your single shiny gold bag?
bags_contains: Dict[str, str] = {}
for k, v in all_bags.items():
bags_contains[k] = []
try:
for kk, vv in v.items():
bags_contains[k] += [kk] * int(vv)
except ValueError:
pass
def count_bags(current_bag: str) -> int:
if current_bag == " " or bags_contains.get(current_bag) is None:
return 0
cnt = len(bags_contains[current_bag])
nbags = []
for k in bags_contains[current_bag]:
nbags.append(count_bags(k))
return sum(nbags) + cnt
def part_2() -> None:
my_bag = "shiny gold"
nbags = count_bags(my_bag)
print(f"My shiny gold bag can contain {nbags} bags")
if __name__ == "__main__":
part_1()
part_2()

181
src/2020/P8.py Normal file
View File

@ -0,0 +1,181 @@
from typing import List, Tuple
# --- Day 8: Handheld Halting ---
# Your flight to the major airline hub reaches cruising altitude without
# incident. While you consider checking the in-flight menu for one of those
# drinks that come with a little umbrella, you are interrupted by the kid
# sitting next to you.
# Their handheld game console won't turn on! They ask if you can take a look.
# You narrow the problem down to a strange infinite loop in the boot code
# (your puzzle input) of the device. You should be able to fix it, but first
# you need to be able to run the code in isolation.
# The boot code is represented as a text file with one instruction per line of
# text. Each instruction consists of an operation (acc, jmp, or nop) and an
# argument (a signed number like +4 or -20).
# acc increases or decreases a single global value called the accumulator
# by the value given in the argument. For example, acc +7 would increase the
# accumulator by 7. The accumulator starts at 0. After an acc instruction, the
# instruction immediately below it is executed next.
# jmp jumps to a new instruction relative to itself. The next instruction
# to execute is found using the argument as an offset from the jmp instruction;
# for example, jmp +2 would skip the next instruction, jmp +1 would continue to
# the instruction immediately below it, and jmp -20 would cause the instruction
# 20 lines above to be executed next.
# nop stands for No OPeration - it does nothing. The instruction
# immediately below it is executed next.
# For example, consider the following program:
# nop +0
# acc +1
# jmp +4
# acc +3
# jmp -3
# acc -99
# acc +1
# jmp -4
# acc +6
# These instructions are visited in this order:
# nop +0 | 1
# acc +1 | 2, 8(!)
# jmp +4 | 3
# acc +3 | 6
# jmp -3 | 7
# acc -99 |
# acc +1 | 4
# jmp -4 | 5
# acc +6 |
# First, the nop +0 does nothing. Then, the accumulator is increased from 0 to
# 1 (acc +1) and jmp +4 sets the next instruction to the other acc +1 near the
# bottom. After it increases the accumulator from 1 to 2, jmp -4 executes,
# setting the next instruction to the only acc +3. It sets the accumulator to
# 5, and jmp -3 causes the program to continue back at the first acc +1.
# This is an infinite loop: with this sequence of jumps, the program will run
# forever. The moment the program tries to run any instruction a second time,
# you know it will never terminate.
# Immediately before the program would run an instruction a second time, the
# value in the accumulator is 5.
# Run your copy of the boot code. Immediately before any instruction is
# executed a second time, what value is in the accumulator?
with open("files/P8.txt", "r") as f:
lines = [code for code in f.read().strip().split("\n")]
def part_1(lines: List[str], debug: bool = False) -> Tuple[int, bool]:
accu = 0
executed = []
nline = 0
while True:
try:
instr, acc = lines[nline].split(" ")
if nline in executed:
# we are in a for loop :(
break
else:
executed.append(nline)
if instr == "acc":
accu += int(acc)
nline += 1
continue
elif instr == "jmp":
nline = nline + int(acc)
continue
elif instr == "nop":
nline += 1
continue
except IndexError:
if debug:
print("Code has run successfully")
return accu, True
if debug:
print(f"The value of the accumulator was {accu} before exiting")
return accu, False
# --- Part Two ---
# After some careful analysis, you believe that exactly one instruction is
# corrupted.
# Somewhere in the program, either a jmp is supposed to be a nop, or a nop is
# supposed to be a jmp. (No acc instructions were harmed in the corruption of
# this boot code.)
# The program is supposed to terminate by attempting to execute an instruction
# immediately after the last instruction in the file. By changing exactly one
# jmp or nop, you can repair the boot code and make it terminate correctly.
# For example, consider the same program from above:
# nop +0
# acc +1
# jmp +4
# acc +3
# jmp -3
# acc -99
# acc +1
# jmp -4
# acc +6
# If you change the first instruction from nop +0 to jmp +0, it would create a
# single-instruction infinite loop, never leaving that instruction. If you
# change almost any of the jmp instructions, the program will still eventually
# find another jmp instruction and loop forever.
# However, if you change the second-to-last instruction (from jmp -4 to
# nop -4), the program terminates! The instructions are visited in this order:
# nop +0 | 1
# acc +1 | 2
# jmp +4 | 3
# acc +3 |
# jmp -3 |
# acc -99 |
# acc +1 | 4
# nop -4 | 5
# acc +6 | 6
# After the last instruction (acc +6), the program terminates by attempting to
# run the instruction below the last instruction in the file. With this change,
# after the program terminates, the accumulator contains the value 8 (acc +1,
# acc +1, acc +6).
# Fix the program so that it terminates normally by changing exactly one jmp
# (to nop) or nop (to jmp). What is the value of the accumulator after the
# program terminates?
def part_2() -> None:
for nline, _ in enumerate(lines):
inst, acc = lines[nline].split(" ")
# change instructions
if inst == "nop":
new_inst = "jmp"
elif inst == "jmp":
new_inst = "nop"
# make a copy of the original code
new_lines = lines.copy()
# change line according to the instructions in the original code
new_lines[nline] = " ".join((new_inst, acc))
accu, has_ended = part_1(new_lines)
if has_ended:
print(f"The value of the accumulator was {accu} after terminates")
break
if __name__ == "__main__":
part_1(lines, debug=True)
part_2()

149
src/2020/P9.py Normal file
View File

@ -0,0 +1,149 @@
import sys
from itertools import combinations
# --- Day 9: Encoding Error ---
# With your neighbor happily enjoying their video game, you turn your attention
# to an open data port on the little screen in the seat in front of you.
# Though the port is non-standard, you manage to connect it to your computer
# through the clever use of several paperclips. Upon connection, the port
# outputs a series of numbers (your puzzle input).
# The data appears to be encrypted with the eXchange-Masking Addition System
# (XMAS) which, conveniently for you, is an old cypher with an important
# weakness.
# XMAS starts by transmitting a preamble of 25 numbers. After that, each number
# you receive should be the sum of any two of the 25 immediately previous
# numbers. The two numbers will have different values, and there might be more
# than one such pair.
# For example, suppose your preamble consists of the numbers 1 through 25 in a
# random order. To be valid, the next number must be the sum of two of those
# numbers:
# 26 would be a valid next number, as it could be 1 plus 25 (or many other
# pairs, like 2 and 24).
# 49 would be a valid next number, as it is the sum of 24 and 25.
# 100 would not be valid; no two of the previous 25 numbers sum to 100.
# 50 would also not be valid; although 25 appears in the previous 25
# numbers, the two numbers in the pair must be different.
# Suppose the 26th number is 45, and the first number (no longer an option, as
# it is more than 25 numbers ago) was 20. Now, for the next number to be valid,
# there needs to be some pair of numbers among 1-19, 21-25, or 45 that add up
# to it:
# 26 would still be a valid next number, as 1 and 25 are still within the
# previous 25 numbers.
# 65 would not be valid, as no two of the available numbers sum to it.
# 64 and 66 would both be valid, as they are the result of 19+45 and 21+45
# respectively.
# Here is a larger example which only considers the previous 5 numbers (and has
# a preamble of length 5):
# 35
# 20
# 15
# 25
# 47
# 40
# 62
# 55
# 65
# 95
# 102
# 117
# 150
# 182
# 127
# 219
# 299
# 277
# 309
# 576
# In this example, after the 5-number preamble, almost every number is the sum
# of two of the previous 5 numbers; the only number that does not follow this
# rule is 127.
# The first step of attacking the weakness in the XMAS data is to find the
# first number in the list (after the preamble) which is not the sum of two of
# the 25 numbers before it. What is the first number that does not have this
# property?
with open("files/P9.txt", "r") as f:
numbers = [int(num) for num in f.read().strip().split("\n")]
def part_1() -> int:
window = 25
for i in range(window, len(numbers)):
if all(
[
x + y != numbers[i]
for x, y in combinations(numbers[i - window : i], 2)
]
):
break
print(f"The first number without the property is {numbers[i]}")
return numbers[i]
# --- Part Two ---
# The final step in breaking the XMAS encryption relies on the invalid number
# you just found: you must find a contiguous set of at least two numbers in
# your list which sum to the invalid number from step 1.
# Again consider the above example:
# 35
# 20
# 15
# 25
# 47
# 40
# 62
# 55
# 65
# 95
# 102
# 117
# 150
# 182
# 127
# 219
# 299
# 277
# 309
# 576
# In this list, adding up all of the numbers from 15 through 40 produces the
# invalid number from step 1, 127. (Of course, the contiguous set of numbers in
# your actual list might be much longer.)
# To find the encryption weakness, add together the smallest and largest number
# in this contiguous range; in this example, these are 15 and 47, producing 62.
# What is the encryption weakness in your XMAS-encrypted list of numbers?
def part_2() -> None:
target = invalid_number
for i in range(len(numbers)):
for j in range(i + 1, len(numbers)):
if sum(numbers[i:j]) == target:
print(
f"The encryption weakness is {min(numbers[i:j]) + max(numbers[i:j])}"
)
return
if __name__ == "__main__":
invalid_number = part_1()
part_2()

1
src/2020/__init__.py Normal file
View File

@ -0,0 +1 @@
__version__ = "0.1.0"

200
src/2020/files/P1.txt Normal file
View File

@ -0,0 +1,200 @@
1865
1179
1328
1390
322
1999
1713
1808
1380
1727
1702
1304
1481
1334
1728
1953
1413
1753
1723
1379
1532
1918
1490
71
1388
1519
807
1427
1729
1952
970
1405
1500
1782
1899
1501
1720
1832
1706
1658
1333
486
1670
1674
1290
1893
1382
1761
1945
1607
1319
1508
1464
1733
1917
1483
1620
1677
1835
1810
1385
1840
1705
1994
1695
1599
1681
1566
1153
1672
1373
1679
1714
1283
1950
1197
1696
1936
1218
1910
1786
958
1565
1583
1914
1853
1682
1267
1543
1322
1965
1406
860
1754
1867
1393
1404
1191
1861
2007
1613
1938
1340
1227
1628
1826
1638
1970
1993
1748
496
1661
1736
1593
1298
1882
1763
1616
1848
92
1338
1707
1587
1996
1708
700
1460
1673
1450
1815
1537
1825
1683
1743
1949
1933
1289
1905
1307
1845
1855
1955
1554
1570
1931
1780
1929
1980
1978
1998
1371
1981
1817
1722
1545
1561
1352
1935
1553
1796
1847
1640
1414
1198
1669
1909
1879
1744
1783
1367
1632
1990
1937
1919
1431
2002
1603
1948
1317
1282
1349
1839
1575
1730
1849
1959
1971
2009
1641
1402
1924
1757
1605
1693
1762
283
1525
1964
1715
1602

102
src/2020/files/P10.txt Normal file
View File

@ -0,0 +1,102 @@
99
128
154
160
61
107
75
38
15
11
129
94
157
84
121
14
119
48
30
10
55
108
74
104
91
45
134
109
164
66
146
44
116
89
79
32
149
1
136
58
96
7
60
23
31
3
65
110
90
37
43
115
122
52
113
123
161
50
95
150
120
101
126
151
114
127
73
82
162
140
51
144
36
4
163
85
42
59
67
64
86
49
2
145
135
22
24
33
137
16
27
70
133
130
20
21
83
143
100
41
76
17

97
src/2020/files/P11.txt Normal file
View File

@ -0,0 +1,97 @@
LLL.LLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLL.LLLLLLLLL.LLLLLLLLLLLLLLLL.LLLLLL.LLLLLLLL
LLLLLLL.LLLLLLLL.LLLLLLL.LLLL.LLLLLLLLL.LLLLLLL.LLLLLLLL..LLLLLLL..LLLLLLL.LLLL.LLLLLLLLLL
LLLLLLLLLLLLLLLL.LLLLLLLLLLLL.LLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLL.L.LLLLLLLL.LLLLLL.LLLLLLLL
LLLLLLL.LLLLLL.LLLL.LLLLLLLLL.LLLLL.LLL.LLLLLLL.LLLLLLLLL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90
F41
W4
S4
F37
E5
S1
E3
F19
R90
S1
W4
S2
E2
L180
F51
W5
R90
F76
E2
F40
N4
R180
E5
N3
F72
S4
R90
F99
E3
F76
W5
R90
E2
S5
R180
F76
N4
L180
F10
F83
S1
F46
L90
S5
E1
S1
F14
N4
E1
R180
E1
R180
S3
F52
L90
S4
L90
W3
F18
S2
F81
L180
F76
L180
W1
S2
F73
N2
F77
W1
F28
L180
N2
F76
L180
W5
F61
N4
E2
R180
S2
L90
F14
R180
N5
E4
F11
E1
L90
N3
E3
F58
W3
F72
W1
N2
W5
F44
L90
W4
F37
L90
F4
W5
N3
F57
N4
L90
S2
F43
S4
W3
S5
F84
S2
L90
N1
R180
W3
L180
N2
W3
R90
N2
R90
F66
L90
F73
E4
S2
L270
W2
E2
S4
E1
R90
W1
F49
L270
F70
S3
W1
N2
E1
F65
W3
R90
F27
E5
F80
S4
W5
F68
E5
R90
F94
W2
L90
F37
L180
E1
F38
N2
F15
N4
E3
L90
E1
R90
S1
E5
N4
N2
E4
L270
N4
R90
E1
S4
E4
F71
E2
R180
N5
E3
F17
L90
N2
W1
L90
F62
W1
F85
W1
L180
F33
S4
W1
N5
F81
W2
R90
S2
F49
L180
S5
F4
W4
N3
W1
F17
R90
W4
N4
E4
N3
L90
S2
R90
S3
L90
E4
R90
S5
F88
S1
L180
N5
E5
F55
R90
F81
E5
L180
R90
F55
R90
W5
F13
R90
N5
F58
L180
S5
F27
E4
S3
F42
R90
F39
W3
S3
F31
S4
L90
W1
S3
W3
N4
W2
S3
L90
F61
E1
F23
S2
F31
S3
L180
W1
N1
L90
N3
F81
E2
N1
R90
F64
S4
F88
E1
N5
W1
S3
F10
N5
L90
F58
S1
R90
E3
L90
N4
F94
S1
W1
S4
L90
F51
L180
N4
R90
L90
N4
F66
W2
S3
S3
W4
F68
L90
F42
E1
F43
R90
N3
F20
E1
N3
E4
N3
F4
S4
R180
W1
R270
N3
F86
L90
E5
F84
N3
W3
F16
L90
N2
E3
L90
S5
E5
F53
L270
N2
F91
R90
E5
N4
F57
E5
S5
F61
S4
F89
E3
N3
N5
F3
S5
F59
E5
F66
R180
S1
W1
N2
R180
S4
E2
L90
N1
W2
F13
L90
E5
F6
W3
F78
E1
F7
W1
N4
W5
F58
R90
E4
N3
E5
N3
W1
S3
R90
F16
L90
F93
R270
N5
F2
W1
S3
F54
R270
F18
R180
F95
L90
W1
E4
N2
W1
L90
S2
L90
W2
S4
F92
W2
S3
R180
N5
E3
N5
E5
F22
F88
S3
E2
R90
S5
W1
L90
E4
F77
N1
W3
F14
E3
R90
W1
F21
N1
F58
W4
N2
R90
N2
W4
F68
W5
N3
L90
F22
R90
F90
F84
S5
F30
N1
W4
R90
F17
R90
W4
S5
E2
N1
F92
N2
R180
N5
E2
R90
F38
R90
F15
E5
N4
N4
E4
S4
F92
R90
F22
S3
W4
N3
E1
R180
F96
L90
E1
N1
F9
W2
N4
F17
N2
R90
F76
S2
F5
S5
F34
R90
F7
N4
F83
N5
L90
W1
S3
R90
S3
W2
S3
F51
N5
W4
F8
E3
F10
N5
F39
S3
E2
L90
E5
L90
N5
E2
N3
F42
S3
F38
N5
F19
F97
W2
R180
S4
E4
S2
W3
F39
W4
F70
S1
W1
R90
F41
L90
E1
N1
E3
W5
F13
E4
F2
R180
F27
E4
N2
L270
E1
N3
W4
F81
W3
R90
E1
F57
S5
R90
F13
L180
N5
F98
F32
N3
R90
N3
W3
S3
W3
N4
F73
L180
N1
E4
F7
E4
R90
N4
R90
S2
E5
F32
S2
N5
W3
R90
W5
S2
L90
F4
R270
N5
E3
L90
S5
F24
N4
R90
F27
L90
F16
R90
N2
R90
N3
L90
S3
L90
F85
S3
F47
N1
E1
N3
R270
S2
L90
F50
L90
S2
F23
N4
L180
E3
F91
R90
E1
W4
F81
W5
R90
F46
E1
W1
F91
N5
W5
N3
W1
L90
F60
S2
L90
E1
F82
S3
W5
N5
F90
E3
S1
F61
E4
F98
R180
F8
R270
F73
W4
L90
W5
L90
F86
W5
L180
F61
N5
F88
E2
L270
F90
N5
F21
R270
F40
L90
W1
N2
L90
E2
S5
E2
S1
E5
N3
F51
S1
F58
W3
L180
F13
R90
N1
F79
W2
F61
R90
F22
E2
N5
F1
S4
F99
S1
S3
E2
F97

2
src/2020/files/P13.txt Normal file
View File

@ -0,0 +1,2 @@
1003055
37,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,x,41,x,x,x,x,x,x,x,x,x,433,x,x,x,x,x,x,x,23,x,x,x,x,x,x,x,x,17,x,19,x,x,x,x,x,x,x,x,x,29,x,593,x,x,x,x,x,x,x,x,x,x,x,x,13

592
src/2020/files/P14.txt Normal file
View File

@ -0,0 +1,592 @@
mask = 100X100X101011111X100000100X11010011
mem[33323] = 349380
mem[52742] = 116688965
mem[4113] = 11499
mem[15819] = 313303
mem[23239] = 755579063
mask = X00X10X1X010110110111X00010X100X000X
mem[49207] = 466621685
mem[34069] = 6874604
mask = 1001100XX00011110110100XX0110000001X
mem[61278] = 56361674
mem[51360] = 61871432
mem[31903] = 45067
mask = 100X100XX0101X11X1X00X00001001X101X0
mem[22981] = 144008
mem[12013] = 49165315
mem[54643] = 50677
mem[59166] = 678129
mem[64022] = 27522
mask = 100110X0001X11011000101X1000001X00X0
mem[32693] = 425145
mem[11437] = 236593490
mem[16078] = 227582
mem[35266] = 197465438
mem[39279] = 127942
mask = 10101000X0X00001X1001000010100111X00
mem[49794] = 2082
mem[60407] = 2129
mem[33300] = 921
mem[18582] = 62106545
mem[32160] = 843912
mem[36917] = 7740
mem[1836] = 54721591
mask = 100010X1X0X011X1101XX00001X01000X10X
mem[8385] = 1381
mem[38022] = 2501412
mem[34713] = 3648024
mem[33245] = 1178087
mem[22176] = 263
mem[20535] = 1289
mem[2092] = 88590569
mask = X001100X00X0X01X0X100X100010110XX101
mem[65061] = 2768
mem[56375] = 6734
mem[18070] = 20571066
mem[61511] = 403157281
mem[4164] = 179682
mem[11801] = 5501
mem[22339] = 14414879
mask = X0011000001X1001X0100111110X00110111
mem[3844] = 1046
mem[33741] = 109390
mem[54311] = 94183595
mem[48744] = 112575
mem[29663] = 2042
mask = X00X100000101001101001001X00001000X1
mem[25325] = 177269
mem[919] = 50779835
mem[52113] = 2386630
mem[60154] = 29645195
mem[24761] = 8101
mask = X101X000X01011011010X100001101110X01
mem[5169] = 2865
mem[55126] = 50829
mem[60154] = 124556261
mem[48753] = 377574
mem[48662] = 9144531
mask = 10011X00001010011010000101110XX0X00X
mem[41623] = 632353121
mem[10365] = 70888870
mem[59458] = 849
mem[18992] = 486294339
mask = X00X100X011011111100X00001001010100X
mem[42046] = 518245944
mem[4654] = 39071
mem[46109] = 1540
mem[3245] = 822
mem[25937] = 257692
mem[19118] = 6601278
mask = 1001001XXX100XXX101XX0001010001000X0
mem[34356] = 55967
mem[52601] = 522574
mem[31903] = 7669828
mem[36165] = 10552
mask = 110X101X00X0111111XX001X0001000XX10X
mem[42649] = 1534730
mem[8324] = 467628
mem[9447] = 3054
mem[41788] = 28205
mem[9353] = 14315559
mask = 1X01X01100111111X101000000X100100000
mem[270] = 3208
mem[20373] = 186089492
mem[43940] = 449607191
mem[63389] = 674
mem[437] = 6933780
mask = 1001X00001X01X0X101101X0010X00110110
mem[22829] = 3301
mem[59260] = 6763
mem[22305] = 203360
mask = 10011110101010X010XX011X0010001XX000
mem[55041] = 6199
mem[55452] = 151
mem[2746] = 464657
mask = 1001000000X0X10110X01101X00100111000
mem[54354] = 666913
mem[44827] = 214920
mem[44621] = 13259544
mem[29462] = 14725
mem[27633] = 284739975
mem[63195] = 11668372
mask = 10X010X10100X111001X101010101X11100X
mem[21667] = 426958
mem[55530] = 91533
mem[10365] = 493
mem[51246] = 513589450
mem[44622] = 1773
mem[4113] = 401
mask = 100X1000001011XXX0100XXX100010X10X00
mem[60407] = 869913
mem[10365] = 59083
mem[18321] = 3019
mem[65061] = 10794134
mem[62827] = 2777572
mem[20373] = 23798334
mask = 1000X10011X010011X10X0000101X0100001
mem[17936] = 4347
mem[38270] = 611
mem[7408] = 2854792
mem[2612] = 604172
mem[24287] = 418220
mem[27110] = 31440
mem[64742] = 1872667
mask = 10X110000010100110X001X01X1000000111
mem[30518] = 13431
mem[64496] = 204238
mem[62259] = 1191
mem[17457] = 3652
mask = 100X1X0XX1101XX11010X000X01010010011
mem[25325] = 67829
mem[4021] = 8039
mask = 1XXXXX0X0010110X11100111001111101110
mem[34600] = 4128134
mem[47565] = 28022073
mask = X0X110000XX010X10010X0X111X111010101
mem[64746] = 17532220
mem[55786] = 109034
mem[12715] = 185475
mask = 1001110X011010111010X1010010100XX100
mem[28923] = 1444
mem[7508] = 41968
mem[39856] = 447
mem[19698] = 4420683
mem[60924] = 7222
mem[8056] = 225410214
mask = 100X10X1X0X011X10110X01X011000X10X00
mem[58206] = 585282
mem[10984] = 105158307
mem[31562] = 526874
mem[60154] = 107013
mem[4409] = 4126230
mask = 1010100010X0XX0111X00X00011X000X0XX0
mem[7122] = 428629
mem[29394] = 262029322
mem[33832] = 6067254
mask = 0001100XXX0010X001100010X000110001X1
mem[1975] = 32392
mem[14891] = 9350
mem[19905] = 28213400
mem[11981] = 132973999
mem[49582] = 4347
mem[64106] = 235564
mem[9648] = 1440
mask = 000110010011XXXX0X1001010001X00X0100
mem[18992] = 628
mem[37263] = 1031
mem[4387] = 1442306
mem[2471] = 1123350
mem[1493] = 88891215
mem[22500] = 3553
mem[6845] = 26007
mask = 10011X00011011X1101X00X001X1X001X111
mem[49101] = 13289
mem[32] = 391365
mem[31906] = 79
mem[48744] = 71043
mask = 1001X0X00010100110X001011001101X01X0
mem[25999] = 2473051
mem[36408] = 56819077
mem[46656] = 2074748
mem[10871] = 8606
mem[7122] = 2053
mem[59403] = 5442
mask = 1XX0X01X100X11111010X000X00X000101X0
mem[1160] = 280063168
mem[20571] = 19030
mem[23225] = 51089295
mem[40992] = 17475
mem[63413] = 1144
mem[19458] = 284777610
mem[21502] = 10410
mask = 100X100X00101X0100X0X0X11100111XX11X
mem[33860] = 160
mem[37007] = 56420
mem[55140] = 490726
mem[47752] = 521745
mem[55594] = 336661995
mem[44008] = 265991679
mask = 1001100001X010011100100X01X0X011111X
mem[1289] = 55191
mem[53058] = 23079796
mem[25362] = 57315626
mem[8895] = 35287816
mask = 0001100100XX00100X1X0X00XX00XX000110
mem[12568] = 136661
mem[9931] = 303487
mem[38781] = 91532
mem[25506] = 950257996
mem[3694] = 6225663
mem[6631] = 62710499
mem[3205] = 7586715
mask = X0001000001X111110100000X0110001000X
mem[61696] = 34763
mem[42583] = 2987088
mem[8416] = 2293694
mem[21503] = 8071
mem[41788] = 950960
mem[9648] = 23284946
mask = 100010000010XX0XX01000000X011100X1X0
mem[30270] = 421
mem[52379] = 86815089
mem[16627] = 3647190
mem[36794] = 132421727
mem[54580] = 248096
mask = 10X1101000X01001X00111110101110001X0
mem[48399] = 9196559
mem[6869] = 32793911
mem[20422] = 1560
mem[12101] = 15618
mem[25154] = 390003034
mem[23791] = 229770864
mem[49558] = 12206144
mask = 100X10010X101XX1XXX000001X00101X1100
mem[3205] = 110968351
mem[65515] = 7362194
mem[2197] = 52580964
mem[13004] = 3723834
mem[46931] = 24935229
mem[919] = 6284
mask = 10001X11100X1X1X10X111X100X0000010X1
mem[30162] = 1665
mem[35687] = 3554
mem[3735] = 8003
mem[18258] = 44276232
mem[48625] = 401841687
mem[62781] = 2814958
mem[5302] = 175144514
mask = 1001X0XX001X101110101000X11X00010X00
mem[38152] = 42369373
mem[36392] = 13302
mem[13867] = 940605082
mask = 10001100X11010X1101000X0X11100110011
mem[63412] = 5289
mem[788] = 6600
mem[27915] = 254034
mem[24347] = 16264001
mem[52437] = 651358
mask = 10011X0X0110X0X11X101100101100X11100
mem[56524] = 1244173
mem[64911] = 2124386
mem[3815] = 107466
mem[14375] = 6798
mem[16285] = 66968238
mem[7968] = 835823180
mask = 10X110100X101XX110X11110XX0111001010
mem[58730] = 132998954
mem[8056] = 754181
mem[39247] = 126
mask = 1001X000001XX10110101X1110110X10101X
mem[59028] = 10817
mem[17977] = 61299509
mask = 1X001100X1X0100110100000X111XXX001X0
mem[2056] = 32701076
mem[2071] = 2401082
mem[9887] = 998417
mask = 100110X11X101X1110X00100X0101111X0X1
mem[33860] = 388064
mem[59050] = 16623098
mem[5188] = 319
mem[37207] = 2470432
mem[27333] = 2026
mask = 1000X000001X1X0X00XXX00X100011X11010
mem[24029] = 9105
mem[14364] = 243545984
mem[4113] = 3279
mask = 1X0X1001X0101011110XX1000100X000X101
mem[17781] = 509963835
mem[37716] = 62611707
mem[23997] = 1023138975
mem[5927] = 32777
mem[55304] = 264062857
mask = 100110X001X01X01100011100X100110X11X
mem[58338] = 741
mem[34693] = 991498
mem[32339] = 30979944
mem[50216] = 66393532
mem[29090] = 11574321
mem[30824] = 15729
mem[16868] = 23942
mask = 1X0XX0010X0011110X101010111011111010
mem[48969] = 3327849
mem[52521] = 460105388
mem[33860] = 422661865
mem[44621] = 6715
mem[27762] = 11952
mem[34536] = 4064
mask = 1001X001001X0011001000100110010001XX
mem[195] = 487302
mem[17992] = 889
mem[11858] = 958195
mem[11013] = 202443463
mask = 1000101X100X1111011000X100110000X001
mem[13097] = 3534
mem[41292] = 85120
mem[9497] = 154119
mem[19610] = 5709354
mem[34972] = 48311
mem[50753] = 180578
mem[35921] = 667946365
mask = XX1010X00110X00111000XX00001000110X0
mem[3712] = 2843518
mem[34604] = 2965
mem[54311] = 162583
mask = 0001X0X00100100X001000001X1X10X01X10
mem[49406] = 965493
mem[59050] = 392048
mem[3574] = 922708604
mem[7419] = 33525859
mem[1933] = 8
mem[4367] = 11521
mask = 1001X0X00X10X00X101X00001110X0100X00
mem[29215] = 417522
mem[56468] = 34229032
mem[26868] = 552971
mem[36368] = 420213
mask = 100110X0X1101011101X01X01101101X001X
mem[4913] = 455
mem[3815] = 11211510
mem[21545] = 1469
mem[35762] = 1806
mem[58825] = 3743
mem[23225] = 474872535
mem[53173] = 46538
mask = 1XX0X00X0X101001001010100X0X01X00010
mem[64106] = 98247289
mem[13686] = 54961348
mem[38944] = 462290318
mem[53185] = 7075
mem[30162] = 39454
mem[14983] = 1010603
mem[38339] = 970
mask = X001100X010X111110001000001X01100110
mem[12827] = 22328
mem[18628] = 7082210
mem[31013] = 20804915
mem[13966] = 86
mem[518] = 1757
mask = X001100XX001001001110000000000XX1110
mem[14375] = 8414661
mem[1568] = 225486
mem[25775] = 336197
mask = 100110000X00100X100001100X111X100X01
mem[2071] = 51386682
mem[32897] = 162194
mem[11308] = 1799417
mem[20829] = 299249
mask = 1X0010XXX0001111XX1100X001X1X0000101
mem[29189] = 36530
mem[657] = 114543286
mem[9356] = 451
mask = X000100000101X0110X0011XX10000110001
mem[30577] = 117881
mem[60874] = 19567558
mem[10363] = 13493
mem[5690] = 382
mem[61059] = 4757304
mem[36165] = 95983791
mask = 100X00X00010100X1010000X101000X10000
mem[33324] = 39476477
mem[34713] = 7398
mem[46214] = 98709
mem[35856] = 1020446010
mask = 10X01X000010000X11100101011X001X0100
mem[65061] = 61054
mem[54052] = 92826
mem[35603] = 58759
mem[58037] = 40910
mem[62217] = 45701380
mask = 1X011000001011011010XX00X10X0X010001
mem[15920] = 5645
mem[28828] = 265910022
mem[29437] = 5544
mem[56112] = 637
mem[45033] = 36063036
mem[12783] = 13776458
mask = 10011011X010100110XX100100XX11011X00
mem[518] = 25998191
mem[13053] = 7866406
mem[38152] = 3208
mem[18730] = 711
mask = 10X11000001XX1X000100X11101XX1X10111
mem[47121] = 11272115
mem[43618] = 27683
mask = 100X1101X0101001100X010000X11001X100
mem[21702] = 34688805
mem[43624] = 3956780
mem[24476] = 17239393
mem[23321] = 25573609
mem[15163] = 1713
mem[65338] = 27386792
mask = 10011010010X10011X0011110XX100001111
mem[53501] = 16700270
mem[28069] = 20683243
mem[33593] = 114830
mem[9962] = 403282549
mem[54061] = 2336
mem[46656] = 7039
mem[58616] = 181
mask = 10001X11001011XX101X0100010010101100
mem[8738] = 234383093
mem[11512] = 1792627
mem[54326] = 1574223
mask = 10011X101X10100XX000X10010X01X01100X
mem[51382] = 17879
mem[44905] = 783
mem[57514] = 1018128542
mem[18628] = 240492
mem[2108] = 3429
mem[2304] = 3748
mask = 0X011001X0X000X000110100101000000000
mem[4452] = 19437119
mem[64742] = 179090
mem[16430] = 486207
mask = 1001X000111X1X1110110X011111100X0011
mem[52004] = 41486
mem[48779] = 83675
mem[17861] = 48577395
mem[39247] = 16952
mem[8738] = 3981
mem[32923] = 1168904
mask = 10011001XX0011X11X0010X1010X10101000
mem[33319] = 44401
mem[4142] = 517003945
mem[29189] = 415157
mem[33358] = 1395165
mask = 1001100X010010011XX00XXX1100101X0101
mem[13618] = 246280673
mem[58338] = 17884
mem[10885] = 816
mem[11277] = 24331199
mem[17936] = 1616051
mask = 1001100X01X01001X00011000110X0X001XX
mem[58338] = 302363844
mem[53596] = 175604903
mem[56468] = 419729
mem[27915] = 581
mem[41501] = 69718
mask = 100110000X1010110100X1X001X00X01001X
mem[18333] = 15544
mem[3929] = 2622169
mem[37718] = 176413
mem[27333] = 848
mem[17456] = 1097
mask = 100110101010X001X000X0001X00001011X0
mem[53045] = 2356198
mem[49908] = 1086
mem[17019] = 7107107
mem[12013] = 70971
mem[7048] = 1585
mem[3666] = 4937143
mask = 10011XXXX01010011000010X1X11100XXX00
mem[65524] = 4129175
mem[5636] = 315661
mem[39270] = 455882795
mask = X1001100110010011010000001110X0X00XX
mem[50481] = 26734
mem[57708] = 199726127
mem[20422] = 130991
mem[13651] = 1094687
mem[1292] = 60536
mask = 110X1011001XX111110100X0000010X1X101
mem[39644] = 14574
mem[8596] = 30400
mask = 1000101XX0X0X1110110111X110011X00110
mem[919] = 32148
mem[41] = 453324
mem[36794] = 179133
mem[2780] = 958033590
mask = 100010X1X11011110010X01101101110X100
mem[20035] = 1674335
mem[18909] = 33271
mem[21491] = 4013451
mem[21792] = 78760
mem[42156] = 980
mem[3276] = 3971405
mask = 10XX10000X10X00111X0XX00X0010011X100
mem[36368] = 5097527
mem[3099] = 104365
mem[57092] = 74461253
mem[46314] = 30483860
mask = X000101X101011X10110XXX001X00X11X010
mem[9948] = 43011947
mem[53185] = 41588
mem[25699] = 101124
mem[60046] = 123243
mem[23975] = 125991
mask = 1X00100000X01X00101011100X1010000101
mem[65101] = 504575
mem[55313] = 14953613
mem[42156] = 526
mem[55573] = 1303957
mem[53260] = 16252
mem[48073] = 8667
mask = 1001100100101X11110X0X0X0111X00001X0
mem[10402] = 793546
mem[45910] = 18
mem[23627] = 72728
mem[7408] = 16579752
mem[22105] = 10576
mem[61054] = 1160961
mem[2989] = 149675383
mask = 0001X001000000XX0111X110010001010110
mem[15867] = 14
mem[23379] = 10511918
mem[4217] = 4840435
mem[29978] = 11828937
mem[28303] = 2358671
mask = 10010010011X0XX11010X000110000110X00
mem[11923] = 149358903
mem[46246] = 3148
mem[17596] = 9370
mem[1540] = 12848
mem[25775] = 29444
mem[32564] = 64008
mem[16097] = 641
mask = 0X011001X010X010X0100X1X0X0X000111X1
mem[45770] = 1008133
mem[15551] = 3912928
mem[53058] = 188856
mem[44827] = 9036496
mem[59530] = 20033543
mask = 1001100X0XX01X0110X000XX010010XX1101
mem[2056] = 737
mem[34972] = 30655
mem[50728] = 927954
mask = 10001X0000X0X0010010101010X001100110
mem[39247] = 425181
mem[64200] = 13111811
mem[8169] = 1250162
mask = 100110000X10XXX11010X0001110X011XX00
mem[62259] = 4350710
mem[56112] = 42327
mem[53173] = 2221557
mem[36759] = 242686307
mem[29077] = 1179326
mem[2056] = 356
mask = 10000000001XX000101000X0X11000X10110
mem[18542] = 454113
mem[44192] = 501708
mem[54994] = 149470837
mem[54260] = 582959
mem[65424] = 295679271
mem[36368] = 2002
mem[16392] = 99
mask = 10100001XX101001X0101100101101000XX0
mem[17861] = 3340321
mem[24705] = 4143350
mem[38940] = 201585
mem[35632] = 19204465
mem[9443] = 5273035
mask = 10X110010010100101000X00001010X0111X
mem[2991] = 51624
mem[56468] = 1603
mem[35633] = 4068
mask = 10011X01001010X10000X011000111101X11
mem[58842] = 69158
mem[43765] = 1624
mem[24913] = 133864698
mem[15015] = 247
mem[10155] = 1064
mem[33787] = 142284522
mem[17457] = 15488682

1
src/2020/files/P15.txt Normal file
View File

@ -0,0 +1 @@
6,3,15,13,1,0

265
src/2020/files/P16.txt Normal file
View File

@ -0,0 +1,265 @@
departure location: 28-184 or 203-952
departure station: 43-261 or 283-958
departure platform: 43-549 or 564-970
departure track: 30-724 or 732-970
departure date: 37-650 or 657-973
departure time: 28-911 or 922-965
arrival location: 41-855 or 863-970
arrival station: 26-304 or 324-970
arrival platform: 45-896 or 903-963
arrival track: 34-458 or 466-962
class: 43-337 or 363-954
duration: 33-239 or 260-973
price: 34-600 or 606-961
route: 25-686 or 711-973
row: 36-101 or 124-963
seat: 25-794 or 806-949
train: 38-139 or 164-952
type: 37-619 or 627-956
wagon: 35-62 or 75-963
zone: 40-479 or 490-960
your ticket:
89,137,223,97,61,167,181,53,179,139,211,127,229,227,173,101,83,131,59,79
nearby tickets:
170,218,811,107,747,184,411,426,594,629,764,509,287,385,734,853,646,474,937,773
683,727,850,596,125,222,334,774,778,567,427,90,478,385,174,497,184,745,646,88
405,582,670,456,607,504,924,850,674,219,500,22,134,479,92,832,220,750,780,449
646,572,467,337,515,380,736,130,850,686,649,96,742,579,61,88,381,725,814,226
55,534,61,866,895,169,260,170,216,230,566,208,763,759,805,366,636,421,762,885
931,892,738,294,56,887,619,718,609,450,164,223,502,286,740,230,570,784,23,821
179,475,428,87,766,749,618,382,77,595,910,498,847,328,338,871,432,210,333,285
681,337,949,101,227,817,273,814,425,884,570,637,905,330,171,97,929,519,512,83
756,22,90,543,420,783,53,125,490,831,877,331,636,508,518,443,334,674,610,619
896,366,581,402,392,679,138,327,384,382,865,627,394,515,266,170,209,825,659,724
130,208,542,778,631,168,331,94,500,848,435,839,65,215,567,385,126,600,891,753
418,474,395,829,649,382,907,172,583,584,493,490,691,393,887,807,577,586,234,617
547,430,743,598,421,947,183,736,432,836,396,549,9,534,100,635,579,608,641,431
444,594,458,235,931,84,184,832,511,662,483,881,667,91,839,397,674,719,942,413
479,125,645,132,380,479,718,734,788,638,779,566,253,599,753,834,774,593,566,567
378,781,522,853,582,851,858,889,674,845,363,286,287,610,518,415,672,219,415,809
759,805,904,661,522,905,261,166,721,492,672,454,565,827,761,586,947,629,833,634
443,526,792,137,752,627,579,408,835,286,99,532,878,243,844,607,771,669,423,382
504,597,425,827,50,737,220,418,62,364,402,72,671,549,444,518,641,390,222,504
435,633,547,677,841,304,749,398,597,725,924,926,527,658,532,490,590,676,598,869
299,416,454,477,510,377,899,479,444,836,665,374,432,206,872,213,753,436,99,372
364,752,507,397,388,628,790,134,205,394,136,716,895,272,175,81,724,332,939,130
929,388,908,687,767,469,784,135,794,570,679,304,178,89,935,941,640,639,544,390
98,759,820,932,853,946,930,454,379,831,856,867,427,283,467,440,457,666,166,627
417,762,751,928,419,773,834,721,721,630,83,596,929,386,211,930,171,506,604,433
903,947,475,872,168,325,215,236,96,233,840,839,675,331,878,947,483,571,475,870
516,203,126,849,331,415,411,1,566,713,207,906,575,637,780,520,864,830,59,892
793,364,586,414,660,261,847,738,526,381,893,105,879,591,532,529,644,840,396,819
579,719,181,522,549,669,302,472,837,448,987,591,637,99,945,372,518,129,399,787
610,606,501,330,418,865,290,468,782,670,577,718,296,803,748,515,864,53,841,299
125,833,456,509,253,836,872,722,746,58,896,414,470,813,720,597,675,97,504,630
680,794,875,96,450,873,409,568,98,89,810,374,882,646,417,50,109,832,839,627
205,788,527,61,618,300,210,932,814,877,678,991,659,934,613,91,826,509,414,327
537,634,923,773,232,181,329,378,219,587,183,55,592,556,391,450,779,628,443,433
506,303,294,671,650,633,781,418,534,379,845,490,845,224,442,929,649,602,882,84
825,58,60,586,418,67,415,439,96,223,234,631,399,894,949,865,512,887,203,389
822,817,746,96,226,675,133,855,929,381,772,628,895,648,424,235,78,219,872,74
890,611,826,894,831,332,752,303,5,184,855,766,641,405,374,547,288,295,817,77
612,388,292,533,171,506,260,609,813,385,678,629,825,929,233,600,780,82,931,120
408,102,589,298,385,852,333,333,169,885,287,492,567,82,131,737,932,213,537,670
334,384,947,128,538,893,867,87,790,522,891,844,944,649,620,775,499,734,745,684
493,924,184,943,746,849,435,448,83,678,94,636,430,120,619,548,774,380,62,518
934,302,297,721,209,98,81,664,96,442,173,511,939,203,725,82,545,940,937,751
543,642,924,675,443,458,385,297,330,940,373,483,790,218,834,767,941,878,449,429
941,391,391,669,98,139,733,685,408,808,15,416,572,209,877,723,547,841,807,504
135,778,764,845,587,598,590,173,815,458,284,923,873,835,881,936,394,902,647,394
164,826,395,752,526,102,182,221,436,514,469,684,208,790,834,94,841,416,494,302
53,865,445,565,56,765,214,637,763,172,507,598,291,975,811,506,466,512,80,297
591,266,165,426,92,333,753,573,635,929,128,820,386,657,411,374,582,208,906,932
373,753,81,303,212,544,777,976,225,878,381,546,180,657,548,414,423,373,734,210
404,922,929,91,535,523,763,758,816,366,606,926,125,864,901,230,739,470,334,396
884,599,719,614,830,224,576,379,815,216,576,412,872,616,661,390,451,654,540,547
505,851,755,410,379,791,64,668,377,336,420,165,675,177,479,225,852,666,638,877
889,546,564,811,423,502,775,589,386,468,896,295,480,337,824,210,169,447,929,392
774,723,732,545,78,7,840,891,165,927,881,375,374,609,239,818,178,387,815,137
406,505,787,476,723,233,446,393,94,89,927,672,531,261,123,492,664,473,389,77
209,330,833,636,533,901,100,635,97,508,535,448,173,98,609,205,428,61,762,549
661,611,58,373,167,579,83,547,896,936,376,497,537,450,141,532,939,179,76,209
840,433,62,811,334,734,493,753,468,296,764,512,176,571,397,229,494,751,894,252
430,426,567,224,63,538,908,504,326,837,925,522,51,843,227,936,821,678,428,214
534,719,51,395,670,477,603,284,594,127,128,131,829,824,927,75,51,948,395,830
427,929,993,865,372,936,532,521,371,825,283,896,417,418,182,440,511,519,723,739
426,578,994,327,414,284,94,83,370,52,852,135,239,830,499,569,300,497,870,437
659,896,297,444,712,100,421,295,770,519,907,415,567,415,652,228,507,793,925,592
478,99,769,905,534,165,545,167,663,832,396,554,62,454,615,783,682,476,478,373
789,830,545,719,410,754,630,786,509,887,930,173,335,741,775,375,547,250,437,884
433,887,770,172,594,330,215,835,945,603,636,784,84,744,422,172,512,438,284,806
619,992,538,591,398,748,495,512,425,373,133,168,583,597,204,736,592,815,57,748
735,936,324,589,432,573,98,374,597,578,717,514,212,328,907,686,410,976,893,447
129,579,847,216,391,334,177,619,779,918,501,782,78,835,855,578,927,472,811,493
426,423,387,233,379,512,592,377,750,865,589,916,822,762,540,124,420,635,844,775
904,170,826,933,297,764,233,330,788,829,112,607,547,777,451,807,384,852,126,298
511,836,406,779,836,532,8,629,425,840,543,766,929,836,261,372,936,894,686,56
440,575,517,827,173,497,835,498,752,212,752,393,59,831,875,877,902,818,600,414
893,558,503,379,83,648,62,903,903,786,630,129,231,454,647,233,177,773,823,442
949,447,806,275,617,766,909,519,607,302,183,236,58,855,809,629,597,293,526,54
84,89,134,658,662,668,77,926,454,634,496,296,334,232,598,493,8,418,509,783
756,713,214,817,790,808,600,395,768,882,228,942,767,387,79,299,790,336,754,603
788,566,739,325,774,674,564,540,373,62,667,905,100,872,415,575,53,297,859,521
171,613,400,898,942,216,207,774,260,783,575,905,522,889,851,947,437,458,713,549
762,926,902,671,589,174,96,615,409,615,475,733,376,295,511,129,658,475,761,443
203,794,501,514,98,860,79,222,510,792,711,168,646,834,887,208,441,527,289,646
397,807,398,337,532,667,770,77,735,941,639,542,763,647,604,213,337,811,410,867
217,568,779,428,765,754,606,883,787,534,544,759,900,403,497,629,210,591,753,734
130,414,792,410,786,124,833,132,840,653,299,944,137,565,871,236,853,735,514,896
878,683,597,521,51,410,116,806,176,715,385,289,672,936,82,588,95,174,933,375
363,425,409,612,631,830,669,96,615,767,173,386,366,654,742,411,59,736,941,821
520,653,375,83,236,904,720,207,304,762,449,640,527,453,174,549,836,949,545,469
444,500,615,839,814,893,593,944,301,243,94,825,211,233,903,872,299,645,410,224
679,570,627,438,327,994,391,669,751,447,293,126,646,138,178,679,228,636,578,594
549,929,427,373,426,15,668,220,664,776,53,738,941,849,51,52,508,751,406,51
928,670,436,782,722,335,845,611,664,794,982,945,300,223,131,870,184,409,80,575
420,238,823,394,436,439,811,820,520,869,261,588,631,677,294,292,762,619,597,989
824,218,524,766,368,934,815,304,283,266,136,792,412,429,173,750,598,903,746,806
295,785,365,517,422,885,569,825,831,424,591,218,650,682,476,549,788,858,575,834
937,579,529,821,572,888,385,608,548,607,367,195,471,627,544,523,828,679,94,53
437,412,288,372,171,867,506,478,329,786,580,467,610,394,206,453,835,24,616,467
370,864,331,780,86,886,441,571,648,482,372,932,892,415,753,394,444,541,165,100
230,855,612,820,396,131,296,98,649,841,130,778,176,862,453,173,135,548,839,637
794,686,296,285,933,582,679,881,392,515,226,773,763,904,67,439,928,720,610,529
172,932,676,885,937,494,717,826,70,129,931,220,635,176,781,364,583,880,911,785
663,717,515,927,837,505,735,825,902,211,540,640,126,420,217,542,716,896,886,719
868,643,16,472,491,650,933,238,216,613,225,225,865,367,939,433,618,410,477,491
229,635,287,593,261,986,759,57,528,775,887,529,237,942,138,411,739,495,225,810
530,758,510,755,823,17,753,570,865,833,732,90,776,793,773,175,751,389,588,767
474,784,496,719,539,911,566,328,879,928,759,764,819,714,488,532,127,682,512,210
525,98,416,757,888,646,179,564,826,430,610,99,734,165,702,847,423,829,765,442
504,383,172,636,297,826,928,757,419,222,182,591,586,154,442,908,440,771,376,138
982,90,754,495,717,214,56,905,638,531,542,330,876,576,495,329,300,779,712,877
132,761,568,917,235,669,673,175,529,933,753,757,236,612,821,819,749,221,438,234
545,451,454,749,514,522,174,724,135,595,289,531,445,386,661,784,861,506,226,893
334,292,814,939,638,402,878,218,780,72,756,906,864,469,454,401,88,534,823,716
667,447,238,578,86,864,565,947,392,179,684,588,851,772,572,751,879,66,295,822
833,445,855,730,935,237,506,401,888,239,94,811,131,379,739,219,469,606,815,569
403,434,940,633,383,819,237,773,526,910,414,76,630,913,642,524,659,331,791,386
508,864,872,397,499,467,671,617,868,110,816,812,217,681,942,510,733,948,713,598
446,915,58,474,752,512,285,299,894,573,749,287,823,375,808,531,540,714,840,409
137,181,53,496,547,720,714,840,830,829,77,579,167,734,814,447,3,659,432,757
10,221,846,753,131,787,454,78,714,410,327,455,375,785,234,51,872,328,370,617
850,890,258,385,754,585,780,528,548,379,678,818,438,896,879,648,893,946,941,671
539,260,372,127,845,603,711,212,609,366,437,582,239,470,426,540,713,743,785,644
577,527,523,210,300,289,591,937,204,775,875,293,822,602,713,741,386,566,669,334
743,421,593,573,296,659,847,388,512,493,779,514,501,76,472,606,678,110,505,768
898,815,937,384,433,669,513,649,75,260,425,127,679,428,59,658,742,566,383,634
417,366,872,377,545,811,197,788,430,843,173,57,743,164,337,580,469,642,841,451
493,790,650,181,293,536,836,574,631,882,843,431,417,432,849,751,225,456,910,862
392,600,740,847,497,816,658,887,647,910,67,641,774,846,568,893,848,617,381,377
295,587,837,168,670,783,766,81,823,452,777,51,622,218,732,78,53,428,786,50
469,433,929,13,468,134,522,546,181,375,509,213,76,771,773,683,139,937,548,863
852,534,507,547,608,884,564,388,779,811,644,755,653,410,433,101,938,417,174,815
531,166,750,940,593,595,492,991,52,824,415,227,138,949,867,375,922,328,640,101
379,334,444,854,923,575,714,412,678,206,203,426,174,977,409,786,838,514,335,368
52,445,750,778,852,389,787,514,904,659,85,756,727,925,543,203,128,329,495,429
812,923,884,417,840,611,717,748,949,636,423,838,556,534,665,892,431,681,528,523
450,218,424,418,493,169,134,288,93,189,880,868,430,389,716,864,678,545,882,521
789,223,436,540,210,248,55,565,394,59,835,363,509,617,775,535,410,792,684,395
329,429,750,138,423,435,210,450,387,770,134,736,638,784,452,863,500,582,829,982
390,82,295,598,519,333,754,290,56,702,217,642,420,506,208,172,846,586,824,375
418,611,291,496,933,817,730,590,237,501,171,644,588,82,807,172,580,380,499,384
880,419,139,329,467,283,829,774,442,137,513,466,176,924,818,978,785,741,184,214
415,537,511,377,135,100,254,879,425,827,591,629,787,90,495,411,169,523,619,573
378,880,747,744,396,482,446,476,719,497,223,948,940,447,492,168,476,734,834,586
388,86,83,475,409,926,821,874,872,386,566,685,498,526,832,791,81,129,781,12
169,473,739,751,592,681,577,544,512,895,86,296,646,454,56,501,325,807,74,51
939,879,882,572,287,387,585,882,427,564,335,205,505,617,460,411,816,515,931,570
248,229,410,632,828,508,332,441,867,99,470,632,442,825,640,442,665,544,762,647
609,564,494,834,853,590,772,532,634,295,808,564,772,71,388,446,632,540,614,793
225,509,665,234,897,506,777,229,164,768,291,300,545,868,231,733,94,334,521,887
406,577,87,538,841,494,436,368,642,866,713,134,671,763,246,607,909,780,499,372
217,439,904,205,528,879,827,685,722,569,880,443,643,580,882,334,496,265,787,298
98,485,510,893,84,181,567,893,852,849,530,939,84,682,447,638,934,368,716,133
886,821,210,585,51,178,134,431,213,56,371,859,237,777,526,337,420,628,526,506
231,428,610,567,297,678,547,842,569,811,914,167,364,675,831,403,767,329,910,869
455,408,519,715,337,0,84,756,328,466,794,370,868,766,177,437,922,752,326,260
414,687,466,672,834,664,171,391,682,509,611,948,466,600,234,513,863,769,468,941
428,716,677,760,611,430,775,818,374,176,611,601,538,885,547,776,665,666,363,752
751,77,637,133,683,431,378,632,457,62,681,544,62,772,859,578,590,417,863,569
217,777,134,125,781,169,478,869,924,139,97,898,647,576,392,236,775,443,523,717
807,774,324,62,948,789,746,939,855,168,645,927,939,449,916,441,584,681,932,720
210,203,478,220,365,932,333,579,367,424,853,278,591,785,886,218,888,533,99,334
640,431,220,807,207,683,932,407,203,405,365,875,863,221,555,61,778,592,780,129
852,203,616,89,639,24,501,790,772,617,220,754,810,757,791,438,775,777,715,296
449,931,372,750,835,95,206,768,923,907,514,77,601,79,889,433,579,750,217,449
886,534,548,844,59,198,53,425,205,134,896,867,670,420,58,830,177,639,829,610
666,911,752,578,835,443,783,135,889,411,736,289,280,220,825,456,832,944,331,923
806,536,674,788,498,366,633,682,583,134,101,829,196,630,589,433,421,761,669,229
930,832,478,415,659,821,662,66,659,820,220,633,935,674,535,80,682,293,381,387
663,298,457,332,128,763,332,84,564,611,604,909,770,204,924,216,745,841,416,288
781,663,514,858,773,466,719,298,172,825,755,866,453,125,852,826,134,429,648,774
528,294,866,794,332,379,184,296,843,596,832,614,532,7,792,664,789,935,600,734
570,222,426,169,873,231,91,679,325,366,614,2,299,876,83,237,53,472,771,468
84,56,872,684,927,336,820,449,447,902,377,233,86,593,759,403,929,842,169,495
382,671,442,589,929,128,214,847,237,800,684,599,164,415,525,684,849,217,227,887
837,745,370,740,855,638,660,89,56,866,224,593,508,511,191,441,134,939,782,887
814,200,401,891,384,763,885,83,126,478,792,420,910,614,175,822,818,225,764,92
716,716,930,388,111,635,842,505,182,467,591,744,88,414,543,444,611,387,512,675
379,887,80,594,844,629,677,722,632,874,238,940,847,942,776,519,193,905,261,930
433,838,779,208,165,443,477,78,764,521,366,397,612,846,606,747,404,431,106,291
386,650,474,331,939,610,489,650,419,416,442,286,93,365,582,367,334,840,642,394
818,302,50,794,820,755,561,661,884,683,631,130,867,723,419,807,848,610,382,889
928,907,467,614,53,271,511,825,578,827,182,814,431,760,541,765,661,299,51,523
377,602,752,169,83,806,527,544,294,325,228,876,866,367,505,531,288,871,368,866
368,854,817,328,923,139,498,547,503,431,897,733,543,288,774,614,84,169,540,525
599,300,226,628,206,294,638,369,906,527,451,453,937,539,222,367,991,942,881,467
513,93,600,794,166,170,416,863,528,511,77,508,115,598,775,217,629,806,512,928
760,857,415,525,762,420,716,738,371,684,290,285,821,810,777,498,810,944,336,648
105,401,503,565,216,787,548,474,382,939,754,827,924,515,755,438,166,770,773,418
871,843,223,588,739,591,328,541,617,678,541,542,916,182,450,776,807,908,424,764
363,396,96,390,892,572,407,780,738,212,298,785,233,164,807,235,76,213,252,777
565,888,366,557,669,418,778,569,380,447,413,166,907,675,878,810,417,618,401,788
368,592,393,810,382,571,741,285,586,632,240,237,779,331,886,378,765,445,869,135
138,522,637,817,684,176,581,926,755,380,765,304,441,898,231,743,836,379,670,131
291,632,821,659,939,514,643,616,124,579,678,619,367,729,518,768,756,386,167,365
818,240,750,237,87,472,769,213,842,260,225,767,629,593,820,775,838,774,764,466
478,769,88,248,716,584,78,751,372,583,85,218,294,446,328,396,83,130,166,668
444,814,476,67,946,629,911,525,589,864,945,478,180,403,835,474,494,218,177,292
527,947,533,500,658,740,737,87,572,97,501,435,911,621,934,466,260,479,413,288
73,304,911,761,412,863,891,590,869,638,662,132,410,397,711,477,92,56,576,736
89,478,284,203,755,889,237,417,886,424,925,659,713,480,774,56,758,224,62,75
871,455,60,675,606,13,516,378,884,506,236,443,763,176,586,789,377,767,547,167
285,673,284,130,223,327,575,633,582,986,390,855,441,494,719,907,763,794,757,610
507,376,837,101,822,670,466,504,838,595,831,885,405,940,657,62,448,197,757,791
788,564,847,786,55,715,288,818,219,468,905,291,789,459,75,792,337,894,515,868
671,429,286,888,436,647,735,756,324,907,260,780,459,509,513,775,180,781,439,300
90,507,533,401,125,80,590,645,872,89,132,878,502,302,746,941,737,556,874,508
597,884,580,849,431,324,418,767,294,532,405,248,785,940,215,841,403,78,374,721
164,748,435,617,869,936,855,607,515,462,784,453,927,83,532,600,207,379,503,814
15,468,58,223,843,878,633,478,741,224,96,751,784,767,736,531,750,216,643,619
472,523,843,481,849,943,90,543,381,572,382,842,566,335,891,911,630,712,420,533
5,923,539,213,810,869,738,757,285,878,535,385,432,667,793,454,775,659,401,944
518,80,925,723,880,425,914,577,470,475,937,448,409,433,678,794,456,85,889,381
602,823,404,176,842,814,528,136,583,716,834,429,908,627,292,744,833,926,855,545
669,209,366,126,716,747,882,540,825,452,617,588,816,228,136,288,126,918,871,452
865,794,237,654,433,630,722,615,541,790,174,609,128,519,682,232,179,644,527,214
401,894,435,543,717,546,238,205,787,555,905,761,407,524,376,757,443,205,373,869
668,906,228,733,719,835,751,776,515,83,782,851,836,788,570,577,605,500,86,927
759,612,391,602,85,506,946,661,385,408,455,335,363,428,658,416,678,129,853,292
853,228,50,399,576,753,422,770,529,862,181,783,391,300,382,784,217,377,366,819
892,842,432,824,181,286,472,467,57,331,884,467,498,298,881,892,770,333,825,484
853,936,792,598,389,886,11,176,661,444,535,599,89,842,377,908,722,216,421,759
182,685,736,206,368,93,877,674,785,837,291,806,324,705,421,877,819,422,490,834
58,516,178,532,89,580,516,214,503,612,199,379,758,167,723,238,59,865,536,405
564,785,445,176,823,540,884,85,946,890,641,54,834,218,542,928,247,499,229,832
925,414,905,199,649,946,816,735,644,753,761,779,328,661,880,849,769,657,547,58
184,583,534,844,366,300,910,767,873,24,325,947,870,183,806,80,659,79,470,457
885,683,826,722,759,514,52,403,850,178,133,520,214,867,608,618,512,446,900,711
660,747,211,443,607,632,95,77,580,826,576,774,804,533,947,747,59,592,885,852
513,435,73,615,179,91,873,383,61,455,82,181,754,721,635,869,86,947,893,52
937,454,927,932,935,212,227,640,135,762,477,849,415,822,681,577,628,872,9,683
374,909,607,775,934,588,373,290,612,457,337,216,545,495,294,134,443,487,742,84
524,900,87,874,742,671,133,547,82,394,847,444,594,368,751,549,637,237,673,867
456,661,828,85,215,912,720,212,477,90,609,642,847,587,835,905,98,454,780,366
873,292,55,833,285,369,405,52,217,650,293,637,926,199,165,662,824,296,223,526
8,429,574,364,80,184,540,590,680,826,438,399,380,503,180,739,388,641,526,182
756,57,236,212,789,808,571,544,81,722,387,617,862,405,396,518,864,169,455,82
93,402,449,610,641,928,2,212,239,420,838,905,790,55,99,946,181,418,748,941
425,68,840,423,217,790,470,288,847,669,791,546,718,781,415,81,395,809,935,573
21,330,375,595,738,948,523,82,713,335,682,501,296,325,289,90,290,574,426,379
410,51,139,410,534,226,520,422,438,498,614,821,495,850,744,396,169,515,440,901
577,171,878,134,600,368,171,169,450,229,761,843,82,575,870,886,64,455,414,564

1000
src/2020/files/P2.txt Normal file

File diff suppressed because it is too large Load Diff

323
src/2020/files/P3.txt Normal file
View File

@ -0,0 +1,323 @@
.#.....#..#..#....##.........#.
...#...#.........#..#.#..#.....
#.#...#.#....#.....#..#..##..##
..#..#.#.#.....#..#..#..##.....
.#..........#....####..##.#..#.
....##.......#.#.....#.........
....#......#....####.#.##......
........##..........##......#..
.........#........##..#.#.....#
.#..##..........#..#...#..##.#.
........#........#.....#....#.#
..#.......#.###...#.......##...
.##..##.#...#........#.........
...#....#..#..#..##.......#..#.
.#.#.##.##..##..#.#.....#.....#
....#.........#........#....##.
........#........#....###.#..#.
........#....#......##.........
.###.##.#.............##.......
....#.........#...#.#.##..#....
#.............#.#.#.#..#..#..##
###...###.###..#........#......
##..#.....#....##..##..........
.......#...#....#...#...#.....#
...#......###...##.###...#...#.
#.......#...##..#.......#..#...
.....##....#....#..#..#.#.##..#
.........#....##.#.#..##.#.....
.....#......#.#.#.....#.....#..
..#..#...#.#...#.........##.#..
.....#..#.................#.#..
##.#....##........#......#.....
#..#...##...#.#.#..#...........
.#..####.....#......#.###......
.#.......##............#....#..
.#.........##..#.##...#.....###
....##.........#.#...####...##.
..#.......#......##.....#.#..#.
...##....#..#..##....##...#.#.#
.................#.............
...#.##..#.##..............#...
...#......#.........##........#
..#.#..##...#.......#.#........
.###.#.....#.##.##.#...#...#...
.....#.##.....#..#......#..#...
.....#.#...#........#..#..#..#.
#...#.##.#....#................
..#...#.#..#.....#.#.#.........
#.#.###...#.....##........##...
#..##.##....#..........##.#...#
...#..#.#.###...##......#.#....
.#..#........##...#......#.#.#.
##........###....#.#....#......
....#...........#.........#....
#.#....#..#.....#.#....#.....#.
........###.......#..#.#.#.#.#.
..#....#.....#...............##
.....#..##....#.#...####.......
.#..#.....#..#.....#....#....#.
..##....#...........#.#....#...
..#.#......#..#.#..#.....###.#.
...........................##..
##.....#....#......###.#...#..#
...#...#.........#..#..#....#..
....#####.#.#.#....#..#........
.##.#..#.#............###......
##.#...##...##....#...#...##...
..#.#.....#.......#..##..###.##
#..##...........#.##.....#.##..
#...#....#...#..##...#.#...#.#.
.#..#...........###...#.#...#..
.#.....#......#.#......#...#..#
.#...##.##...............#....#
..#.........#....#.............
.#..##..#.#................#...
..#.#.#.#.................#.#.#
...#..#.#..#.#......#........#.
##....#......###.#......#......
..#....##.....#..#........#....
.#.#....#...#.#.....###..#...#.
.#..#...##.....#.#...#.....#.#.
...#....#....##....##.....#....
.......#...#...##..#.#.......#.
.###..#..###.#.#.#.#.#.....##..
....#.#......###.#....#....#..#
##.....#.....##.#.....#....#...
......#...##...#..#.#.....#....
...#.........###.....#..##.....
....#...#..#....#..#.........##
.#........#..#.....#.##.#....#.
.......#......#.##...##.#..#...
#......#.......##..##..#.#.....
..#.##..........#.#..#......#..
#.....#.......#......#.........
...##......##...........#.#....
.#....#........#...#.#..#.....#
.#...#...##......##...##...##.#
.#.#.##.....##....#.#.#..#.....
...#..#........#.....#.#.#####.
#..#..#......#....##....##.....
.#.............#....###.##.#...
.#....#.......#.#.....#......##
#..#.#.#........#...#..#...#...
#.#.#.....#.......#.##..#.....#
..#....#.....#...##.#...##.....
......#..#.............###...#.
..#...#.#....###...#...........
.........#..#..#....#..#.......
#....#.....#..#....#.#..##.....
.#..#.#.....#...##.....##......
.....####..#..#......#....##..#
#.#....#....#.##.......#.#.....
....#.#.............##..#.#...#
....#.#.#.....##.....##..#...#.
.#..#...#....#...#.#....#...#..
.#..#.#.#.......#...#..........
...##..#..#...##.....#.......#.
..##...##.#..#.......#.........
.##.#.......##...#...#......#.#
##.#.#..#...#............#.....
..#.##...##..#....##..#......#.
...#..........#.....#.#........
...#..#..#.......#.#.....##....
##.............#.....#.##...#..
#.#......#........#...#.##..#.#
...#..#...##.#.#........#.#....
#.....##...........#....#......
...##....#..#.#...#........#...
..##..####..#..#...............
.#.#..#......#.##.........##.#.
.##....#...##.#...#..##..#.....
........#........#.###.#.#....#
......##...#......#..#..#......
..#.......#...#..##........#..#
.#....###..###....###...##.#.##
#.#....#..#.#...#.#...##...#...
..#..##......#..#......####....
.#....###.......#...##...#.....
...#....#..#.....#..#...####.#.
............#.####..##...#..##.
.#..#.......#....#...#......#.#
.......#.......#..#.#..........
...#.#............#..#......#..
..#...........#...##......#...#
...##......#.........#.#...#.##
.#..#..#..#......#...........#.
....#.....#.###........#.......
..##.#.#........#.#...##....#..
.#.#........##....#...#......#.
.......#.##..###...............
#..#...##.....##........##....#
...####........#...#.........##
...#..............##..#........
......#.....#....#.......#....#
..###......#..##.....##....##..
##...#.....#..#.#.#...#.....#..
...#....#............#.........
..#..##...#..#.........#.......
.#.#.#...##..........#..###....
.......##.#.#.#...#.#...#.....#
..#..#..#..#...###.....#.##....
.#.#.....#.....##.#..#...###..#
.........#..##......##...##.#.#
#.........##..#......#..#.#.#..
.#..##.#.##......##........#...
..#...#.....##..#......#.....##
.#..#...#......#..#...#.....##.
..#..##...#.....#.....#........
....##..#....#.#....#......#.#.
..#.......##..#..#.##.#..#...##
...#..........#...#..##........
..#............#.#......#......
.#...##.......#...#.#........#.
.#...#....#..#....#....#.#...#.
......#..#.#..#..............#.
.....#.##.#...............##.##
.#...............#.....#..#...#
.#..##.......#.#...#..#..#....#
..#..###.##........##..........
.#....#..##...#.#.........#....
.......#.....#....###...##.#.#.
##..#.#...##.##.##....##.#.###.
#.#...........#..#.#...........
....#..#..#..#...#....#.......#
........##....#..#......##.#...
.#.#..##...##...#....#..#.###..
#..##....#..#...#.......##.....
..###..#.###......#..####....#.
.....#..#........##.#..#.......
.#......##..............#.#.#..
..#.#.......##...#....#.#.###..
#..#..#...###..#...............
......#..#.....#..#..#...#.....
.#...#..........###..#..#.#....
.#......##..#......#.....###..#
.......#...#..#....###.....#...
#....#.......###.##.....##....#
..#.....#..##..#.........##....
.....##....#.#......#..........
....#...#...#......##.....##.#.
........#.#.#......#...........
.#....#...#...#....#.....#...#.
..............#..##.#.....###.#
.#......##.....##...#....#.....
.............#.##......#.....#.
.#....#.#............#.#..##...
.#...##.......#..#...##....#...
.#.....#..........#............
#.#.#........#.....#..#....##..
#....#.##......#...#...........
........#.##.....#...##.....#..
..#.##....#.##.#...#.#.#....#..
......#.......####......#.#...#
#...#.##.####......#.....##....
.#..#....#.......#...##.....#..
................#......#.##....
###...##..#.#..........#....#.#
#.#..#.....#..##.##.##...#...##
..#.......#.......#..##..#..##.
......#.##.......#..#.....#...#
.##..##..#.#.......#..#......#.
....##.#....#...##.#..#.....#.#
..#..#.........###.#...........
....#.......#....##......#....#
..........#...#......#....#...#
..#.#....###.....#..#.#.#..#...
.....#...##..#.##........####..
##.............#....##........#
..#..........#..##.#...........
##.#.......#.#....#......#.#...
........####.....##.#.........#
.....#...#.#.....#.##..##.#....
........#...#.#.#.#...#......#.
.#..#.#....#.#...##.....#..#...
.....#.#............#.#.#......
....##.#...#...#.##...##.......
.........#.##.....#.......#...#
...........###....#.#....#...#.
.#..#.###......#..#............
#...#..#......#.#...#......#...
..##.#.#........#........##..##
..#.#.##..##....#........#.#.#.
...#........###......#.#.....#.
#.#.#.##........#.#...#..#.....
#..#...............#...#.#...#.
.....##......#...#.....#..#....
............#...#...#.##.#....#
...#..#..#...##.#....#.#..#.#..
##.#..#..............##........
.#.#..#.#..#....##..#.#.##.##..
......######....##.....#.......
.#.......#..........#.#..#.#..#
..........#.#......#...##......
#..........#.#..#.............#
...#...#..#....................
....#...#.....#.....##.....#...
..#....##.....#..#......#......
.#.#.....#..##.##..........###.
.#.##....#....#....#....#...#..
..##.....................##.#..
.....#..##....#.#.....##..#....
.####...#...##..#.##...#..#....
.........#.#...#.......###.....
...#..#........#..#..##.....#..
..#....#....#....###.....#.....
......#....#..#.........#......
#.#...#..#..#.#...#..#.#......#
..........#..........#.#.##....
.#..###..##..#....#.#.....#..#.
.##......#..#.##...#.........#.
...##...#....#.........#..#....
....#..##........#.........#...
.........##....#...#.#.....#..#
.#..........##...#..#.#..##....
#.......#...#...#............#.
.....##.#.##.......#.......#...
...........#...#.....###.....#.
#..................#.##..##...#
.........##.............#...#.#
#.#.....##...#........###....##
...##..#.##.....###.....#......
..#...#.#..#......##.#.......#.
.........##.#...........###..#.
..#...#.....#...#.#.....#..#...
.....##..#...#.#.#....#.....###
..#.#....#..#..#..#....#.#...#.
........##....#......#....#..#.
.##..#.....#.#....#..#.###.....
..............##.........#.#.#.
.##....#.#..#..#...#..........#
.....##.......#....#..#......#.
...#.#....................#..##
#.##..#.#...#...#....#.#....##.
...#.#..#.###................#.
.....##..#.##.#.#.........#.#..
.................##..........#.
..#......#........#.#....#.....
#......##......#......###....#.
....##....#..#..####......#...#
.##.##.........#...#..#....#.#.
.#..#....##...##..#...........#
#...#......#...#...........#...
...#...####.............##..#..
.....#....##............##....#
......##.#...##...........#.#..
..#......##.....###.......#.###
...#...#......#...##.#........#
.#.........##.##......##.......
....................#....#....#
.#.#.#........##.#....#.....#..
#.#.....####..#.........#.#.#..
...####..#..............#.#....
....#.#....#..........#....#...
.#..#..#.#...#..#.#............
.#.#.......##........##.....#..
#.#.##..#.....##......##....#.#
......#...#...#...#......#.....
.........##..#.....#.####.#.#..
.....#....#.###...#.###.#..#..#
..#.#..#..#.......#.......##...
.....#.........#......##.#....#
..#.#.##....#.#...............#
.....#..#....##......##..###...

1000
src/2020/files/P4.txt Normal file

File diff suppressed because it is too large Load Diff

901
src/2020/files/P5.txt Normal file
View File

@ -0,0 +1,901 @@
BBFBBBBRRL
FBFFFFBLRL
FBFBBFFRLR
FBFFFBFRLR
FFBBFFFLRR
FFBBBFFRRR
BFBBFBFLRL
BFFFBFFLRR
FBBBFFBLLR
BBFFBBFRRL
BFBBBBBRLR
FBBBBFFLLR
FFBFFFBLLR
FFBBFBFRRR
BBFBFFFRRR
FFBFFBBLLR
FBBFFBBLRL
FFBBBFBLLL
FFBFFBBLRR
FBFFBFBLLR
FFFBBBFLLL
BFBBFBFRLR
BBFBBBFLLL
FBBBFBBRLL
FFBBBBFRRL
BFBBBBFLRR
BBFBBFBLRL
FFBFFFBLRL
BFBBBBBRRR
FFFBFBFLLR
BFBFBBBLLR
FFBFBBBLRL
FFFBFBBLRR
BFFBFFFLLL
BFFFBFBLRL
BFBFFFBRLL
BBFFFFBRLR
FBBFFFBLRR
BFFFFBFLLL
BBBFFFFLLL
BFBFFBBRLL
BBFBFFFRRL
BFBBFFFRLR
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L
BFFFFFFRLL
FBFBBBFRLL
BFBBFBFLRR
BFBFBBBRLL
BBFBBBFRRL
BFFBBFBRRR
BFBFFBFLLR
FBFBFBFLLR
FFFFFBBRRL
FBFBBBFRLR
FBFFBBFLLL
FFBFBFFRLR
BBFBFBBLLL
FFFFBFFLRL
FBBFBBFLLL
BFBFBBFLRL
FFFFBBFLLR
BFBBFBBRRL
FBBBFFBRRL
FBBBBFFRLL

2198
src/2020/files/P6.txt Normal file

File diff suppressed because it is too large Load Diff

594
src/2020/files/P7.txt Normal file
View File

@ -0,0 +1,594 @@
muted tomato bags contain 1 bright brown bag, 1 dotted gold bag, 2 faded gray bags, 1 posh yellow bag.
posh brown bags contain 1 dark lime bag, 5 mirrored crimson bags, 1 striped chartreuse bag.
dotted violet bags contain 4 striped white bags.
mirrored black bags contain 1 clear yellow bag.
light aqua bags contain 3 clear silver bags, 2 shiny coral bags, 2 muted tomato bags, 2 drab turquoise bags.
faded violet bags contain no other bags.
shiny lime bags contain 3 muted brown bags, 4 dull gray bags.
dark green bags contain 3 muted magenta bags.
faded bronze bags contain 5 clear lime bags, 3 muted gold bags.
clear lavender bags contain 4 dark beige bags, 3 mirrored crimson bags, 2 bright blue bags.
striped bronze bags contain 5 muted olive bags, 4 clear chartreuse bags, 2 vibrant blue bags.
dim bronze bags contain 1 clear indigo bag.
dull crimson bags contain 3 dotted violet bags, 2 pale teal bags, 3 plaid bronze bags, 3 faded aqua bags.
mirrored bronze bags contain 3 striped maroon bags, 4 shiny gold bags, 4 light indigo bags, 5 clear orange bags.
vibrant white bags contain 4 light lime bags.
dark blue bags contain 1 faded black bag, 5 mirrored plum bags, 4 muted cyan bags.
drab bronze bags contain 5 mirrored plum bags, 2 bright turquoise bags, 1 clear gray bag, 3 faded chartreuse bags.
mirrored lime bags contain 2 faded red bags.
posh violet bags contain 3 dull chartreuse bags, 5 clear plum bags, 2 mirrored chartreuse bags, 5 dull magenta bags.
dull bronze bags contain 2 wavy purple bags, 4 drab salmon bags, 5 dull chartreuse bags.
dull black bags contain 4 shiny crimson bags, 5 dotted turquoise bags, 4 clear beige bags, 2 striped maroon bags.
striped aqua bags contain 1 faded violet bag, 1 plaid teal bag.
clear silver bags contain 1 faded green bag.
dark yellow bags contain 4 shiny plum bags, 2 dull gray bags, 5 light lime bags, 4 shiny orange bags.
dull coral bags contain 2 striped turquoise bags, 4 mirrored fuchsia bags, 5 faded yellow bags.
shiny yellow bags contain 5 wavy maroon bags, 1 striped fuchsia bag.
shiny black bags contain 2 muted tomato bags, 3 muted maroon bags, 4 shiny orange bags.
posh aqua bags contain 3 wavy cyan bags, 5 posh brown bags, 4 dim plum bags.
plaid maroon bags contain 5 faded aqua bags, 5 mirrored olive bags, 5 plaid gold bags, 2 vibrant gray bags.
mirrored gold bags contain 3 shiny tomato bags, 3 shiny crimson bags.
muted lavender bags contain 2 muted tan bags.
vibrant magenta bags contain 1 dull purple bag, 2 vibrant coral bags, 5 faded silver bags.
striped tomato bags contain 3 faded beige bags, 3 pale tan bags, 2 drab orange bags.
dull turquoise bags contain 3 striped green bags, 2 shiny blue bags, 2 dim purple bags.
shiny aqua bags contain 1 clear salmon bag.
drab silver bags contain 2 shiny gold bags, 4 posh yellow bags.
plaid gold bags contain 3 bright lavender bags, 5 plaid cyan bags, 1 bright brown bag, 5 faded turquoise bags.
wavy lavender bags contain 2 plaid lavender bags, 3 plaid red bags, 4 posh cyan bags, 4 bright aqua bags.
dark bronze bags contain 4 muted cyan bags, 4 clear cyan bags.
plaid lime bags contain 1 posh teal bag.
mirrored magenta bags contain 5 dotted turquoise bags.
light turquoise bags contain 5 posh tan bags, 2 posh aqua bags.
dark indigo bags contain 5 clear crimson bags, 3 posh lime bags.
mirrored brown bags contain 4 posh white bags, 1 dim lime bag, 2 pale magenta bags, 1 mirrored chartreuse bag.
vibrant lavender bags contain 5 posh plum bags, 1 posh aqua bag.
dim crimson bags contain 3 vibrant beige bags, 4 clear indigo bags, 3 dim lime bags, 4 striped olive bags.
vibrant violet bags contain 5 vibrant red bags, 1 striped white bag.
dull silver bags contain 4 striped bronze bags, 1 plaid plum bag, 1 dim tomato bag.
plaid brown bags contain 5 drab blue bags, 2 light turquoise bags, 5 dull lavender bags.
dim aqua bags contain 4 plaid lavender bags, 5 muted maroon bags.
faded plum bags contain 3 striped tan bags.
drab black bags contain 5 clear bronze bags, 4 plaid red bags, 1 drab orange bag, 5 clear lavender bags.
pale bronze bags contain 5 dim plum bags, 1 drab lavender bag.
mirrored purple bags contain 5 mirrored crimson bags.
mirrored red bags contain 5 striped magenta bags, 4 mirrored chartreuse bags, 5 pale cyan bags.
posh lime bags contain 5 dull lavender bags, 1 faded turquoise bag, 2 striped coral bags, 3 striped green bags.
vibrant black bags contain 2 drab salmon bags, 4 clear tomato bags, 2 faded turquoise bags.
striped orange bags contain 2 plaid blue bags, 5 pale teal bags, 1 drab maroon bag.
dotted tomato bags contain 1 dim white bag, 5 dotted magenta bags, 4 dull tomato bags, 1 dull gold bag.
posh orange bags contain 3 posh gold bags, 4 light lime bags, 2 faded violet bags, 5 faded turquoise bags.
muted gold bags contain 4 faded maroon bags, 5 dark turquoise bags, 4 bright turquoise bags, 3 plaid silver bags.
striped yellow bags contain 4 drab fuchsia bags, 1 dim lime bag.
dotted green bags contain 4 clear beige bags.
faded fuchsia bags contain 1 dull blue bag, 4 bright coral bags.
shiny lavender bags contain 3 mirrored beige bags, 1 dark coral bag, 1 muted turquoise bag, 3 light brown bags.
bright maroon bags contain 5 faded lime bags, 3 dim brown bags, 3 vibrant yellow bags.
dark maroon bags contain 2 drab red bags.
dark white bags contain 3 wavy turquoise bags, 4 dotted red bags, 3 plaid fuchsia bags.
dotted aqua bags contain 4 clear green bags, 3 drab magenta bags, 1 dull tomato bag, 3 striped coral bags.
faded red bags contain 3 plaid purple bags, 3 dark lime bags.
wavy yellow bags contain 1 bright yellow bag, 2 light chartreuse bags, 1 dull chartreuse bag.
posh beige bags contain 5 shiny orange bags, 4 drab silver bags, 1 striped cyan bag.
dull fuchsia bags contain 5 faded lavender bags, 1 dark cyan bag, 2 clear tomato bags, 3 mirrored chartreuse bags.
muted silver bags contain 5 muted brown bags, 2 striped brown bags, 4 mirrored bronze bags, 5 faded plum bags.
dim white bags contain 1 dull bronze bag, 3 dotted beige bags, 4 wavy tan bags, 4 vibrant white bags.
faded green bags contain 1 clear indigo bag, 2 pale cyan bags, 1 wavy brown bag.
pale blue bags contain 2 posh turquoise bags.
muted green bags contain 1 dull bronze bag.
dull indigo bags contain 4 shiny silver bags, 1 wavy red bag, 4 muted orange bags.
muted plum bags contain 1 shiny lime bag, 4 plaid tomato bags, 2 faded indigo bags.
striped magenta bags contain 1 mirrored chartreuse bag, 1 faded beige bag, 3 bright blue bags, 2 clear yellow bags.
clear coral bags contain 4 dark turquoise bags, 2 posh magenta bags, 2 shiny aqua bags, 5 pale aqua bags.
pale olive bags contain 4 shiny crimson bags, 3 wavy cyan bags, 1 vibrant beige bag, 3 dark beige bags.
striped plum bags contain 2 light salmon bags.
dim indigo bags contain 2 shiny lavender bags, 4 clear lavender bags, 1 bright tomato bag, 1 vibrant bronze bag.
striped green bags contain 5 muted cyan bags.
shiny salmon bags contain 1 wavy brown bag.
wavy aqua bags contain 5 muted white bags, 1 mirrored gray bag, 5 dull lavender bags.
posh gold bags contain 1 vibrant beige bag, 3 dull chartreuse bags, 4 mirrored brown bags.
wavy blue bags contain 3 shiny gray bags, 4 posh turquoise bags.
dark fuchsia bags contain 2 posh fuchsia bags, 4 bright indigo bags, 3 posh maroon bags, 2 posh aqua bags.
shiny purple bags contain 5 clear maroon bags, 3 bright indigo bags.
dull chartreuse bags contain no other bags.
light beige bags contain 4 dim purple bags, 1 posh red bag, 4 clear aqua bags, 1 striped coral bag.
wavy purple bags contain 3 bright turquoise bags.
clear yellow bags contain 2 posh plum bags.
clear violet bags contain 5 faded chartreuse bags, 5 clear green bags, 3 wavy brown bags.
striped white bags contain 3 light white bags.
clear green bags contain 4 muted bronze bags.
drab crimson bags contain 1 posh tan bag.
dark turquoise bags contain 2 shiny tomato bags, 5 wavy maroon bags, 5 dim aqua bags.
drab magenta bags contain 1 pale gray bag, 4 striped olive bags, 2 posh brown bags.
dotted gray bags contain 1 dull tomato bag, 1 posh yellow bag.
plaid magenta bags contain 5 clear green bags, 2 dotted bronze bags, 5 drab black bags.
striped indigo bags contain 4 mirrored magenta bags, 5 posh beige bags.
bright fuchsia bags contain 4 dotted orange bags, 2 faded green bags, 1 bright turquoise bag.
mirrored teal bags contain 1 mirrored chartreuse bag, 2 drab brown bags, 2 dull black bags.
dotted purple bags contain 5 dotted turquoise bags, 5 dotted orange bags, 5 shiny gold bags.
dim lavender bags contain 3 shiny coral bags, 5 mirrored crimson bags, 2 clear yellow bags, 2 muted orange bags.
shiny gray bags contain 3 vibrant purple bags.
mirrored white bags contain 1 mirrored brown bag, 3 striped purple bags.
light cyan bags contain 4 bright maroon bags, 3 posh violet bags, 4 faded aqua bags, 5 dull tan bags.
wavy gray bags contain 4 mirrored violet bags, 1 muted orange bag.
striped silver bags contain 2 bright silver bags, 5 posh aqua bags.
dull green bags contain 5 mirrored chartreuse bags, 2 dim beige bags.
faded black bags contain 5 wavy turquoise bags, 1 muted tan bag, 1 dull chartreuse bag.
posh crimson bags contain 2 muted tan bags, 4 striped beige bags, 1 mirrored lavender bag, 5 faded white bags.
pale teal bags contain 4 posh aqua bags, 5 mirrored plum bags, 1 muted turquoise bag.
muted tan bags contain 1 striped coral bag, 1 mirrored brown bag, 1 posh gold bag, 4 muted cyan bags.
posh indigo bags contain 5 shiny tomato bags, 1 clear salmon bag, 3 dotted black bags, 1 striped maroon bag.
clear gray bags contain 1 bright violet bag.
striped olive bags contain no other bags.
mirrored silver bags contain 4 shiny maroon bags, 4 muted coral bags.
clear brown bags contain 2 dotted magenta bags, 3 clear aqua bags, 5 faded lime bags.
striped lavender bags contain 4 dull turquoise bags.
plaid teal bags contain 3 muted bronze bags, 2 drab orange bags.
faded blue bags contain 3 bright teal bags, 2 posh brown bags.
drab gold bags contain 3 dotted black bags, 5 striped yellow bags.
plaid gray bags contain 2 drab magenta bags, 4 bright yellow bags, 5 pale beige bags.
mirrored coral bags contain 1 shiny fuchsia bag, 5 vibrant gray bags, 1 wavy maroon bag.
drab fuchsia bags contain 3 dull silver bags, 5 posh brown bags.
wavy olive bags contain 2 plaid lavender bags.
vibrant maroon bags contain 4 drab brown bags, 1 dark indigo bag, 1 clear gray bag.
faded magenta bags contain 1 dim crimson bag.
pale aqua bags contain 3 dotted turquoise bags.
dotted orange bags contain 2 light coral bags.
dim coral bags contain 4 pale gold bags.
faded turquoise bags contain 5 posh gold bags, 2 bright turquoise bags, 1 drab magenta bag.
striped tan bags contain 3 bright red bags.
drab green bags contain 3 muted gold bags, 3 plaid gold bags.
posh red bags contain 3 mirrored red bags, 2 striped fuchsia bags, 3 faded violet bags, 1 bright black bag.
drab lime bags contain 2 dotted brown bags.
plaid tomato bags contain 4 muted olive bags, 2 striped tan bags.
striped blue bags contain 3 drab lavender bags.
bright bronze bags contain 2 clear gold bags, 2 striped gold bags, 4 dim coral bags, 5 vibrant purple bags.
muted white bags contain 4 light olive bags.
pale violet bags contain 1 bright teal bag, 5 bright lavender bags, 2 faded green bags, 5 clear gold bags.
striped violet bags contain 2 drab turquoise bags, 2 bright red bags, 3 vibrant blue bags.
dull beige bags contain 2 vibrant beige bags.
light lime bags contain 1 bright turquoise bag, 3 vibrant beige bags, 2 wavy bronze bags, 1 muted cyan bag.
striped gray bags contain 5 vibrant brown bags, 3 wavy red bags, 3 plaid bronze bags, 4 wavy aqua bags.
dark violet bags contain 5 dim indigo bags, 1 dim chartreuse bag, 5 dim purple bags, 1 striped magenta bag.
dim turquoise bags contain 3 muted tan bags.
pale green bags contain 2 pale olive bags, 5 wavy red bags, 5 pale lime bags.
dark beige bags contain 1 light green bag, 4 drab beige bags, 2 dim cyan bags.
drab maroon bags contain 3 light coral bags, 1 clear crimson bag.
dark gold bags contain 1 dim black bag, 1 dotted gold bag, 3 dim gray bags, 5 wavy red bags.
drab white bags contain 1 pale gray bag.
mirrored olive bags contain 4 mirrored crimson bags, 3 faded beige bags.
pale yellow bags contain 4 shiny maroon bags, 5 dim tomato bags, 4 shiny olive bags, 1 faded olive bag.
striped lime bags contain 2 light lavender bags, 4 shiny aqua bags, 2 pale maroon bags.
mirrored tomato bags contain 2 clear crimson bags, 2 pale beige bags, 5 striped purple bags, 4 clear tomato bags.
dark black bags contain 1 mirrored orange bag, 4 shiny brown bags.
plaid chartreuse bags contain 1 dim beige bag, 2 vibrant red bags, 1 bright lavender bag, 5 mirrored tomato bags.
posh gray bags contain 5 dotted blue bags.
mirrored crimson bags contain no other bags.
pale silver bags contain 3 plaid cyan bags.
shiny green bags contain 4 dotted violet bags, 3 drab olive bags.
light brown bags contain 2 vibrant yellow bags, 3 dim tomato bags.
muted yellow bags contain 1 drab magenta bag, 5 muted olive bags, 3 clear crimson bags, 2 mirrored brown bags.
mirrored plum bags contain 4 muted tan bags, 1 posh brown bag, 3 faded silver bags, 1 dull gold bag.
dark chartreuse bags contain 1 dim orange bag, 2 dull indigo bags, 1 dark beige bag.
wavy brown bags contain 3 striped chartreuse bags.
faded white bags contain 5 striped magenta bags, 2 muted turquoise bags, 2 bright cyan bags, 3 clear chartreuse bags.
bright green bags contain 1 light salmon bag.
bright salmon bags contain 3 posh tan bags, 2 drab orange bags.
drab plum bags contain 2 posh turquoise bags, 4 dark salmon bags, 3 posh lime bags, 4 light coral bags.
drab tomato bags contain 5 faded teal bags, 4 mirrored black bags, 4 mirrored lavender bags, 1 drab salmon bag.
faded olive bags contain 4 light green bags, 4 clear bronze bags.
plaid bronze bags contain 3 dim plum bags, 2 posh white bags, 1 dotted gray bag, 2 dull gray bags.
light salmon bags contain 2 faded violet bags.
bright red bags contain 1 posh plum bag, 4 clear crimson bags.
faded maroon bags contain 3 striped olive bags, 5 wavy bronze bags, 3 bright lavender bags.
mirrored orange bags contain 1 bright silver bag, 3 bright red bags, 1 drab brown bag.
dotted indigo bags contain 1 dull black bag, 2 posh white bags.
wavy teal bags contain 1 dotted tomato bag, 4 faded beige bags, 5 dull beige bags, 1 clear crimson bag.
dim magenta bags contain 2 posh maroon bags, 1 dim yellow bag, 4 faded red bags, 5 pale olive bags.
light red bags contain 3 dim silver bags, 5 drab maroon bags, 3 shiny red bags.
plaid red bags contain 1 posh yellow bag, 5 muted turquoise bags, 1 bright red bag.
pale magenta bags contain 4 dim plum bags, 5 dull tomato bags, 3 bright turquoise bags, 1 dark lime bag.
posh yellow bags contain 5 posh brown bags.
bright lavender bags contain 5 clear aqua bags, 1 posh yellow bag, 4 pale magenta bags.
dim fuchsia bags contain 4 muted green bags, 3 mirrored beige bags, 5 dark brown bags, 1 dull crimson bag.
vibrant salmon bags contain 4 clear lime bags, 5 plaid brown bags, 5 pale white bags.
dim black bags contain 3 faded magenta bags, 5 dull gray bags, 2 vibrant blue bags, 2 vibrant bronze bags.
dotted yellow bags contain 3 drab turquoise bags, 3 muted cyan bags, 3 clear gray bags.
mirrored beige bags contain 1 drab salmon bag, 1 striped olive bag, 5 dotted gold bags, 2 faded beige bags.
striped brown bags contain 5 bright maroon bags, 2 light gold bags.
striped chartreuse bags contain no other bags.
dark lime bags contain 3 dull chartreuse bags, 5 dim violet bags, 2 mirrored crimson bags.
faded salmon bags contain 2 dull chartreuse bags, 4 posh brown bags, 3 mirrored olive bags, 5 light green bags.
bright brown bags contain 2 vibrant bronze bags, 2 dim gray bags.
dull tan bags contain 5 posh indigo bags.
dim silver bags contain 1 vibrant tomato bag, 4 dim maroon bags.
clear lime bags contain 4 clear gray bags, 1 clear tan bag, 4 posh brown bags, 1 dark indigo bag.
shiny beige bags contain 5 plaid lavender bags, 4 drab red bags, 4 striped green bags, 2 vibrant tomato bags.
dim tomato bags contain 3 clear yellow bags, 2 wavy gold bags, 3 pale cyan bags.
dotted tan bags contain 3 pale white bags.
dark crimson bags contain 1 dim coral bag, 4 muted brown bags, 2 clear chartreuse bags.
plaid coral bags contain 1 dark yellow bag, 3 muted tomato bags.
faded lavender bags contain 1 muted lavender bag, 5 mirrored red bags, 1 muted orange bag, 3 light coral bags.
vibrant crimson bags contain 3 plaid plum bags, 2 bright olive bags.
faded chartreuse bags contain 5 dim cyan bags.
dark gray bags contain 5 clear plum bags, 5 faded aqua bags.
shiny crimson bags contain 4 mirrored gray bags, 2 dull green bags.
muted purple bags contain 5 dull tomato bags.
light coral bags contain no other bags.
pale beige bags contain 3 dark indigo bags, 5 bright turquoise bags, 3 vibrant lavender bags, 1 pale magenta bag.
posh turquoise bags contain 4 faded green bags, 2 light coral bags, 1 light teal bag, 3 dim tomato bags.
clear aqua bags contain 2 wavy cyan bags, 1 muted yellow bag.
posh silver bags contain 4 plaid fuchsia bags, 2 dotted violet bags, 3 drab olive bags.
dark silver bags contain 4 vibrant purple bags, 1 vibrant cyan bag.
dull plum bags contain 3 dim red bags, 3 wavy turquoise bags, 2 mirrored beige bags.
muted magenta bags contain 3 faded lime bags, 2 muted crimson bags, 1 mirrored gray bag.
plaid indigo bags contain 4 wavy aqua bags, 1 plaid silver bag, 1 light blue bag, 3 wavy magenta bags.
wavy violet bags contain 2 striped bronze bags.
plaid yellow bags contain 3 dull plum bags, 1 striped blue bag, 5 faded aqua bags.
dotted bronze bags contain 3 bright lavender bags, 1 wavy lime bag, 2 dotted cyan bags, 1 mirrored beige bag.
striped coral bags contain 4 dark cyan bags, 4 wavy bronze bags, 2 dotted magenta bags.
posh tan bags contain 4 mirrored brown bags, 3 dotted teal bags, 5 light lime bags.
bright white bags contain 2 muted indigo bags, 2 wavy aqua bags.
posh cyan bags contain 4 muted tomato bags, 1 posh tan bag, 4 mirrored lavender bags, 2 drab blue bags.
wavy gold bags contain 1 dim beige bag, 5 dotted teal bags, 2 dotted turquoise bags.
mirrored cyan bags contain 2 drab silver bags, 5 muted orange bags, 5 mirrored olive bags.
dim orange bags contain 3 striped blue bags.
muted indigo bags contain 4 clear aqua bags, 2 mirrored tan bags, 2 clear green bags, 2 posh brown bags.
dull tomato bags contain 4 posh plum bags.
plaid orange bags contain 1 striped coral bag.
posh bronze bags contain 3 vibrant purple bags, 2 dim brown bags, 1 clear violet bag, 4 mirrored gold bags.
dotted chartreuse bags contain 3 dull crimson bags.
faded coral bags contain 1 wavy tomato bag.
pale salmon bags contain 2 dull purple bags, 2 dark tomato bags.
wavy crimson bags contain 4 bright fuchsia bags, 5 light lime bags, 1 posh tan bag.
pale fuchsia bags contain 2 wavy black bags, 1 muted crimson bag, 2 dotted aqua bags.
striped fuchsia bags contain 1 mirrored violet bag, 3 dull chartreuse bags, 1 shiny lavender bag.
plaid cyan bags contain 2 vibrant lavender bags.
dotted beige bags contain 4 dim beige bags, 2 vibrant lavender bags.
mirrored turquoise bags contain 4 mirrored beige bags, 3 dotted turquoise bags, 1 striped maroon bag.
faded indigo bags contain 3 dark lime bags, 5 mirrored salmon bags, 3 drab red bags.
dotted silver bags contain 3 dark yellow bags, 4 posh crimson bags.
light silver bags contain 2 wavy orange bags, 2 vibrant maroon bags, 4 wavy beige bags.
vibrant cyan bags contain 1 shiny fuchsia bag, 3 posh plum bags.
pale crimson bags contain 1 dotted gold bag, 4 mirrored brown bags, 1 mirrored olive bag.
vibrant beige bags contain 4 dull white bags.
faded tomato bags contain 4 mirrored salmon bags, 5 faded green bags.
dull maroon bags contain 5 mirrored olive bags, 4 dim crimson bags.
muted aqua bags contain 2 plaid olive bags, 1 shiny indigo bag.
shiny teal bags contain 4 striped bronze bags, 3 dotted aqua bags.
dotted cyan bags contain 3 clear yellow bags, 5 faded maroon bags, 3 dim gray bags.
wavy beige bags contain 1 posh cyan bag, 4 wavy magenta bags, 5 dim green bags.
bright silver bags contain 4 clear beige bags, 2 faded chartreuse bags, 4 clear aqua bags.
striped purple bags contain 2 clear chartreuse bags, 4 dotted magenta bags.
clear gold bags contain 2 vibrant lavender bags, 3 posh aqua bags, 4 light green bags, 3 pale cyan bags.
dull cyan bags contain 5 dim tomato bags, 1 dim orange bag.
light crimson bags contain 1 dull green bag.
faded crimson bags contain 4 plaid coral bags, 3 dotted orange bags.
pale gray bags contain 3 dark lime bags.
faded gold bags contain 1 muted crimson bag, 1 plaid red bag, 5 wavy cyan bags.
plaid plum bags contain 4 bright blue bags.
wavy tomato bags contain 5 posh brown bags, 2 striped maroon bags, 4 faded indigo bags, 3 clear gold bags.
shiny fuchsia bags contain 2 mirrored gray bags.
wavy magenta bags contain 2 posh olive bags.
dim purple bags contain 1 vibrant yellow bag.
wavy black bags contain 1 pale green bag.
wavy silver bags contain 3 dull yellow bags, 5 faded magenta bags, 4 mirrored black bags, 3 dull indigo bags.
shiny cyan bags contain 2 shiny salmon bags, 2 pale olive bags, 1 shiny red bag.
striped cyan bags contain 5 pale magenta bags, 3 faded silver bags.
dim salmon bags contain 2 vibrant aqua bags, 1 drab red bag.
bright chartreuse bags contain 1 shiny tomato bag, 2 wavy yellow bags, 2 wavy silver bags.
drab coral bags contain 1 drab silver bag.
pale white bags contain 2 faded red bags, 4 pale gray bags, 2 mirrored lavender bags.
dim violet bags contain 3 dull white bags.
muted red bags contain 3 shiny lime bags, 3 plaid beige bags, 2 shiny aqua bags.
bright teal bags contain 3 dim tomato bags, 3 mirrored turquoise bags, 5 vibrant yellow bags.
striped maroon bags contain 1 dim plum bag, 2 wavy cyan bags, 1 dull beige bag.
vibrant green bags contain 5 dotted salmon bags, 4 mirrored olive bags.
dim tan bags contain 2 shiny white bags, 3 posh lime bags, 1 dotted teal bag.
muted olive bags contain 4 mirrored chartreuse bags.
muted salmon bags contain 1 clear salmon bag.
dim beige bags contain 2 pale gray bags, 2 mirrored olive bags, 3 clear yellow bags.
light tomato bags contain 1 pale white bag, 2 dark teal bags, 5 shiny lime bags.
striped beige bags contain 4 bright plum bags, 1 plaid olive bag, 2 pale crimson bags.
light indigo bags contain 4 bright fuchsia bags, 1 dull gold bag, 5 dark beige bags, 3 mirrored teal bags.
drab gray bags contain 3 dark coral bags, 5 mirrored teal bags, 5 dim purple bags, 4 mirrored violet bags.
dark teal bags contain 2 muted orange bags.
dim plum bags contain 1 posh brown bag, 4 dotted orange bags, 3 dotted gold bags, 2 drab salmon bags.
dim green bags contain 3 dark beige bags, 3 bright tan bags, 4 striped white bags, 5 faded white bags.
drab teal bags contain 1 light gray bag.
dark aqua bags contain 5 vibrant green bags, 3 shiny teal bags, 3 dull red bags.
wavy lime bags contain 5 mirrored brown bags, 2 dark cyan bags, 4 dull green bags, 1 wavy cyan bag.
muted violet bags contain 3 light plum bags.
posh green bags contain 2 shiny fuchsia bags, 3 posh aqua bags, 5 dotted turquoise bags.
clear blue bags contain 4 vibrant gray bags, 4 shiny plum bags.
muted brown bags contain 1 dark lime bag, 1 mirrored olive bag, 1 faded beige bag.
dotted black bags contain 5 pale beige bags, 1 dotted tomato bag, 2 wavy cyan bags, 3 wavy aqua bags.
muted chartreuse bags contain 5 muted lavender bags, 5 clear aqua bags, 5 bright maroon bags, 4 plaid bronze bags.
bright purple bags contain 4 bright fuchsia bags, 3 pale tomato bags, 5 mirrored tomato bags.
drab orange bags contain 5 light crimson bags, 4 dark beige bags.
clear white bags contain 2 shiny salmon bags.
posh lavender bags contain 4 posh tan bags, 1 posh magenta bag.
faded purple bags contain 2 dull maroon bags, 2 mirrored coral bags, 4 vibrant green bags.
dotted olive bags contain 5 dull chartreuse bags, 2 wavy magenta bags, 1 pale tan bag, 3 dim turquoise bags.
muted crimson bags contain 1 striped olive bag, 3 dull chartreuse bags, 1 light bronze bag.
striped turquoise bags contain 2 light blue bags.
bright indigo bags contain 3 dull green bags, 1 pale teal bag.
drab purple bags contain 3 bright aqua bags, 4 dull tan bags, 2 mirrored indigo bags.
wavy salmon bags contain 4 dark olive bags, 5 dull chartreuse bags, 3 vibrant purple bags, 1 pale lime bag.
drab olive bags contain 5 dim crimson bags, 3 posh green bags, 3 clear brown bags, 1 posh teal bag.
muted orange bags contain 5 shiny orange bags, 3 muted black bags, 5 bright blue bags, 1 mirrored olive bag.
drab salmon bags contain 5 light coral bags.
dark salmon bags contain 4 bright lavender bags, 5 clear gray bags.
posh blue bags contain 1 drab coral bag, 3 faded green bags.
shiny violet bags contain 1 posh yellow bag, 4 light turquoise bags, 4 drab silver bags, 2 muted teal bags.
clear tomato bags contain 3 bright plum bags, 3 muted indigo bags, 2 muted maroon bags, 3 dotted cyan bags.
dotted coral bags contain 4 dark tomato bags, 5 dotted magenta bags, 5 wavy gold bags.
striped teal bags contain 1 plaid brown bag, 2 bright plum bags, 1 mirrored blue bag.
pale maroon bags contain 4 posh gold bags, 5 striped magenta bags, 2 dim brown bags, 1 clear chartreuse bag.
muted lime bags contain 5 dull lavender bags, 3 plaid gray bags, 3 shiny tomato bags, 4 drab tomato bags.
mirrored green bags contain 2 striped purple bags.
posh chartreuse bags contain 4 dull tan bags, 2 plaid coral bags, 1 plaid cyan bag, 4 clear bronze bags.
shiny bronze bags contain 3 striped indigo bags, 4 mirrored white bags, 1 faded coral bag, 1 clear violet bag.
dull olive bags contain 1 muted coral bag, 3 clear tomato bags, 3 bright tan bags.
light maroon bags contain 5 mirrored tomato bags.
light chartreuse bags contain 3 dark indigo bags, 2 mirrored coral bags.
light bronze bags contain 1 bright yellow bag.
dim chartreuse bags contain 3 plaid gray bags, 2 faded teal bags.
dotted lavender bags contain 3 bright teal bags, 3 vibrant green bags.
dark tan bags contain 5 posh black bags.
muted blue bags contain 2 mirrored salmon bags, 4 striped olive bags.
mirrored chartreuse bags contain 2 bright turquoise bags.
clear cyan bags contain 5 dotted gold bags, 3 shiny fuchsia bags, 3 dim violet bags.
light white bags contain 2 vibrant bronze bags.
pale orange bags contain 3 plaid aqua bags.
faded brown bags contain 2 shiny blue bags, 1 dark cyan bag.
plaid salmon bags contain 5 wavy yellow bags, 3 faded aqua bags, 1 dull yellow bag.
shiny blue bags contain 2 bright violet bags, 3 light lime bags, 5 clear blue bags.
dull orange bags contain 4 faded turquoise bags, 2 dim lavender bags.
dull gold bags contain 2 dotted gray bags.
vibrant tan bags contain 2 posh turquoise bags, 2 muted orange bags, 4 plaid blue bags.
shiny white bags contain 1 pale chartreuse bag, 4 dark tomato bags.
light olive bags contain 3 striped bronze bags, 3 posh white bags.
dark lavender bags contain 3 drab magenta bags, 3 plaid black bags, 2 dull red bags.
shiny turquoise bags contain 1 vibrant black bag, 5 wavy fuchsia bags.
clear fuchsia bags contain 2 dull aqua bags, 2 shiny coral bags.
shiny coral bags contain 2 pale magenta bags, 4 muted bronze bags, 4 light coral bags.
striped salmon bags contain 3 posh olive bags.
shiny olive bags contain 5 pale chartreuse bags.
dotted brown bags contain 1 mirrored brown bag.
dull red bags contain 1 faded chartreuse bag, 1 dull chartreuse bag, 5 clear lavender bags, 5 wavy salmon bags.
bright beige bags contain 1 posh crimson bag, 1 posh chartreuse bag.
plaid crimson bags contain 5 wavy magenta bags, 4 muted lime bags, 1 muted maroon bag, 3 dim green bags.
wavy maroon bags contain 1 wavy cyan bag, 1 bright turquoise bag, 4 shiny coral bags, 3 drab beige bags.
vibrant fuchsia bags contain 2 dull tomato bags, 1 light coral bag.
pale brown bags contain 5 striped gray bags, 1 light plum bag, 1 pale chartreuse bag, 2 shiny tomato bags.
light plum bags contain 4 bright yellow bags, 2 dark tomato bags, 4 plaid coral bags.
dull gray bags contain 1 mirrored olive bag.
light yellow bags contain 5 bright magenta bags, 5 pale gray bags, 4 mirrored red bags.
dull lime bags contain 3 dark indigo bags, 3 mirrored salmon bags, 5 striped white bags, 3 posh aqua bags.
drab yellow bags contain 4 shiny white bags, 3 faded green bags.
bright gray bags contain 5 drab olive bags.
bright coral bags contain 3 mirrored brown bags, 5 dim bronze bags, 5 muted white bags, 1 dim crimson bag.
dim maroon bags contain 1 vibrant red bag, 3 faded fuchsia bags, 3 vibrant blue bags.
plaid turquoise bags contain 3 bright yellow bags, 5 dark purple bags.
plaid violet bags contain 1 clear yellow bag, 2 posh violet bags, 3 mirrored bronze bags, 3 vibrant tan bags.
dotted maroon bags contain 2 striped fuchsia bags, 3 striped white bags, 2 light blue bags, 5 plaid cyan bags.
dull blue bags contain 1 wavy brown bag.
drab tan bags contain 1 clear indigo bag, 4 faded violet bags, 3 pale cyan bags.
posh maroon bags contain 5 striped aqua bags, 3 wavy coral bags, 3 mirrored olive bags.
dim blue bags contain 4 dotted maroon bags, 5 striped black bags, 5 plaid gray bags.
faded teal bags contain 3 clear indigo bags, 5 dark beige bags, 1 shiny cyan bag, 3 bright tomato bags.
clear bronze bags contain 1 muted yellow bag.
dark plum bags contain 3 faded white bags, 2 wavy brown bags, 5 pale white bags.
wavy cyan bags contain 3 mirrored brown bags, 5 faded silver bags, 1 dim lime bag, 5 clear indigo bags.
posh plum bags contain no other bags.
wavy plum bags contain 4 dull indigo bags, 3 faded black bags, 4 bright turquoise bags, 5 bright red bags.
dim red bags contain 2 light cyan bags.
pale coral bags contain 2 wavy brown bags, 1 dull gray bag.
posh teal bags contain 2 striped purple bags, 1 dotted gray bag.
clear tan bags contain 5 striped maroon bags.
wavy chartreuse bags contain 5 bright chartreuse bags.
posh black bags contain 2 mirrored gray bags, 3 mirrored beige bags, 2 clear aqua bags, 2 bright plum bags.
muted maroon bags contain 5 vibrant red bags, 1 plaid lavender bag.
vibrant silver bags contain 1 mirrored salmon bag, 5 clear lime bags, 4 shiny violet bags.
pale indigo bags contain 4 clear maroon bags, 4 wavy cyan bags.
mirrored salmon bags contain 4 pale gray bags, 4 dim beige bags.
pale lavender bags contain 1 wavy turquoise bag, 2 striped green bags, 4 light coral bags, 4 clear chartreuse bags.
drab beige bags contain no other bags.
wavy coral bags contain 3 muted cyan bags, 3 dull bronze bags.
plaid black bags contain 2 posh orange bags, 4 shiny tan bags, 5 mirrored brown bags, 3 shiny plum bags.
light gray bags contain 2 dim crimson bags, 1 faded salmon bag.
shiny plum bags contain 2 dull tomato bags, 1 mirrored tan bag, 2 dull green bags, 1 dark lime bag.
drab blue bags contain 5 mirrored chartreuse bags, 5 dull tomato bags, 2 mirrored beige bags, 4 posh plum bags.
faded orange bags contain 5 striped yellow bags, 1 drab gray bag, 5 vibrant purple bags, 3 muted fuchsia bags.
plaid purple bags contain 1 faded silver bag, 4 shiny gold bags, 4 dim cyan bags.
pale tan bags contain 3 shiny gold bags, 2 shiny lavender bags, 3 pale cyan bags.
bright crimson bags contain 5 clear cyan bags.
dotted lime bags contain 2 posh violet bags, 5 striped beige bags, 4 bright teal bags.
posh purple bags contain 5 mirrored silver bags, 1 dim tan bag, 1 pale white bag.
vibrant red bags contain 3 pale chartreuse bags, 2 dim purple bags, 4 wavy maroon bags, 1 dull gray bag.
light fuchsia bags contain 1 drab maroon bag, 2 faded violet bags.
bright blue bags contain 4 drab salmon bags, 4 dotted gold bags.
bright turquoise bags contain 2 dotted gold bags, 2 dim violet bags, 1 vibrant bronze bag.
light orange bags contain 1 plaid olive bag.
light gold bags contain 2 clear plum bags, 2 striped bronze bags, 4 dark yellow bags, 2 posh orange bags.
dotted magenta bags contain 4 wavy cyan bags.
muted teal bags contain 1 clear beige bag, 4 plaid brown bags, 2 posh plum bags.
light black bags contain 3 drab bronze bags, 2 plaid silver bags, 3 mirrored coral bags.
wavy turquoise bags contain 5 dotted orange bags.
muted fuchsia bags contain 3 dull black bags, 1 striped coral bag, 1 bright magenta bag.
posh white bags contain 5 bright blue bags, 2 pale gray bags, 2 dark lime bags, 4 dotted gold bags.
striped black bags contain 5 drab maroon bags, 1 faded green bag, 2 mirrored silver bags, 2 shiny white bags.
striped gold bags contain 4 dim gray bags.
dull violet bags contain 3 light plum bags, 4 faded turquoise bags, 3 mirrored cyan bags.
striped red bags contain 5 plaid orange bags, 1 clear plum bag, 2 vibrant lavender bags.
bright cyan bags contain 1 dim brown bag, 4 mirrored turquoise bags.
dim cyan bags contain 5 bright turquoise bags.
shiny chartreuse bags contain 2 striped white bags.
vibrant blue bags contain 5 drab tan bags, 4 dotted magenta bags.
mirrored aqua bags contain 3 shiny gold bags, 3 drab brown bags, 3 faded black bags, 3 clear tan bags.
dark cyan bags contain 4 pale gray bags, 1 dotted gold bag, 4 dotted orange bags, 4 pale magenta bags.
wavy fuchsia bags contain 5 mirrored teal bags, 1 dotted gray bag.
pale gold bags contain 3 posh lavender bags, 2 drab brown bags.
shiny orange bags contain 2 dim gray bags.
posh tomato bags contain 5 bright brown bags.
clear orange bags contain 4 posh plum bags, 5 dull gray bags.
pale purple bags contain 1 drab purple bag, 5 bright crimson bags.
drab brown bags contain 1 bright red bag, 3 light turquoise bags, 1 posh plum bag, 2 dull chartreuse bags.
shiny tan bags contain 2 dotted gold bags, 2 plaid orange bags, 3 clear cyan bags.
faded cyan bags contain 2 wavy cyan bags, 2 posh teal bags.
clear maroon bags contain 2 light coral bags.
drab cyan bags contain 3 wavy bronze bags, 5 posh aqua bags, 4 dull crimson bags, 1 shiny gold bag.
plaid white bags contain 4 wavy brown bags.
bright tan bags contain 2 shiny silver bags.
drab turquoise bags contain 2 faded beige bags, 4 vibrant lavender bags.
faded yellow bags contain 2 dull black bags, 3 vibrant yellow bags, 4 plaid silver bags, 3 posh teal bags.
bright lime bags contain 3 striped aqua bags, 4 dull tomato bags, 5 dim gray bags.
plaid tan bags contain 2 plaid coral bags, 5 drab blue bags, 4 drab orange bags.
clear purple bags contain 2 drab tomato bags, 3 mirrored bronze bags, 2 dark teal bags, 4 dull green bags.
wavy red bags contain 4 faded tan bags, 4 wavy cyan bags.
vibrant purple bags contain 5 mirrored salmon bags, 1 dark salmon bag.
wavy tan bags contain 1 shiny olive bag, 2 faded maroon bags.
vibrant gray bags contain 1 mirrored olive bag, 2 dotted turquoise bags, 4 striped chartreuse bags, 1 dull tomato bag.
mirrored gray bags contain 4 bright blue bags, 1 striped olive bag.
dull aqua bags contain 1 vibrant purple bag, 1 faded maroon bag, 3 muted yellow bags.
clear red bags contain 1 posh violet bag.
light purple bags contain 2 shiny olive bags, 2 striped yellow bags, 4 dotted turquoise bags, 2 shiny violet bags.
dull brown bags contain 2 wavy red bags, 4 clear green bags.
wavy bronze bags contain 2 dull tomato bags.
muted beige bags contain 5 wavy aqua bags, 4 striped maroon bags, 2 drab tan bags.
muted black bags contain 1 posh green bag, 1 clear green bag, 5 striped bronze bags.
light green bags contain 4 dim lime bags, 1 shiny gold bag, 3 shiny crimson bags, 2 muted yellow bags.
mirrored fuchsia bags contain 1 dull bronze bag.
pale tomato bags contain 2 vibrant maroon bags, 2 muted orange bags, 1 wavy brown bag, 2 dull cyan bags.
drab chartreuse bags contain 5 mirrored magenta bags.
shiny indigo bags contain 4 pale teal bags, 3 dull silver bags, 5 mirrored olive bags.
bright aqua bags contain 3 bright violet bags.
shiny magenta bags contain 2 bright red bags.
vibrant orange bags contain 3 mirrored black bags, 5 mirrored olive bags.
mirrored indigo bags contain 4 vibrant coral bags, 1 mirrored crimson bag, 2 mirrored red bags.
plaid blue bags contain 5 wavy aqua bags, 2 plaid fuchsia bags, 3 wavy purple bags, 1 dim lime bag.
dotted plum bags contain 4 striped chartreuse bags, 4 dotted yellow bags, 4 light yellow bags, 3 striped red bags.
light violet bags contain 5 shiny chartreuse bags, 1 wavy lime bag, 1 vibrant beige bag.
dotted salmon bags contain 2 drab maroon bags, 5 muted black bags, 1 posh violet bag, 1 dull lime bag.
vibrant gold bags contain 5 dull magenta bags, 1 clear aqua bag, 3 mirrored beige bags, 1 pale cyan bag.
mirrored lavender bags contain 3 clear gold bags.
dotted gold bags contain 1 drab beige bag, 1 mirrored crimson bag.
bright magenta bags contain 1 striped maroon bag, 1 striped bronze bag, 5 mirrored beige bags, 1 dotted maroon bag.
clear black bags contain 1 faded chartreuse bag, 5 light blue bags.
bright tomato bags contain 3 mirrored tan bags, 2 mirrored olive bags, 3 muted bronze bags, 1 posh violet bag.
mirrored violet bags contain 3 striped chartreuse bags, 3 dim lime bags, 5 pale chartreuse bags, 1 posh tan bag.
faded gray bags contain 4 light crimson bags, 3 muted turquoise bags.
dark red bags contain 5 muted green bags, 4 mirrored maroon bags.
clear crimson bags contain 2 muted olive bags, 5 striped chartreuse bags.
vibrant lime bags contain 1 dim crimson bag, 2 faded coral bags, 3 light crimson bags.
vibrant bronze bags contain no other bags.
dotted white bags contain 4 dim purple bags, 2 mirrored chartreuse bags.
clear indigo bags contain 3 mirrored olive bags, 2 posh brown bags.
pale lime bags contain 5 faded salmon bags, 5 striped tan bags, 4 light white bags, 3 pale chartreuse bags.
vibrant coral bags contain 1 muted orange bag.
clear teal bags contain 1 posh plum bag.
wavy white bags contain 2 dim chartreuse bags, 1 dull tomato bag, 1 dull fuchsia bag, 4 faded silver bags.
dull yellow bags contain 2 mirrored gray bags, 2 shiny olive bags, 4 clear beige bags, 2 dim crimson bags.
posh fuchsia bags contain 3 dull teal bags.
dotted teal bags contain 3 dull white bags, 5 pale gray bags.
vibrant tomato bags contain 4 dull green bags.
dull purple bags contain 3 shiny red bags, 1 dim crimson bag, 5 drab turquoise bags.
vibrant aqua bags contain 1 bright cyan bag.
clear plum bags contain 5 drab magenta bags, 2 mirrored salmon bags.
dark tomato bags contain 1 dull beige bag, 1 faded violet bag.
bright violet bags contain 3 dim lime bags, 4 muted cyan bags, 4 dull gold bags.
dim teal bags contain 3 mirrored orange bags.
dark magenta bags contain 2 light tan bags, 5 bright violet bags, 4 dim aqua bags, 5 bright teal bags.
faded silver bags contain 2 dotted gold bags.
light lavender bags contain 5 mirrored chartreuse bags.
vibrant chartreuse bags contain 1 pale indigo bag, 2 drab tan bags, 2 striped bronze bags.
dotted blue bags contain 3 faded gray bags, 3 muted coral bags, 4 drab red bags.
drab lavender bags contain 1 dull bronze bag.
wavy green bags contain 2 vibrant brown bags.
bright gold bags contain 5 shiny blue bags.
dull lavender bags contain 4 vibrant beige bags, 4 wavy purple bags.
shiny tomato bags contain 5 plaid olive bags.
faded aqua bags contain 5 mirrored olive bags.
clear beige bags contain 4 shiny fuchsia bags, 5 wavy bronze bags.
pale black bags contain 1 shiny lavender bag, 4 muted olive bags, 3 striped gold bags.
faded beige bags contain 3 clear yellow bags, 1 bright turquoise bag.
dull salmon bags contain 1 plaid tomato bag, 1 dull coral bag, 4 dotted coral bags.
drab aqua bags contain 5 muted olive bags.
plaid fuchsia bags contain 2 wavy lime bags, 3 mirrored gray bags, 3 clear crimson bags.
pale turquoise bags contain 3 bright cyan bags, 3 posh blue bags, 3 dark olive bags.
dotted red bags contain 3 pale black bags, 3 light blue bags, 4 clear gold bags, 4 pale olive bags.
dark olive bags contain 5 shiny coral bags.
dull white bags contain no other bags.
shiny silver bags contain 3 posh plum bags, 4 posh brown bags, 4 dull chartreuse bags, 1 drab beige bag.
muted gray bags contain 5 posh coral bags.
light magenta bags contain 3 vibrant cyan bags, 1 striped tan bag, 5 dark maroon bags, 2 wavy cyan bags.
dim brown bags contain 3 dull green bags, 2 dull beige bags, 2 wavy gold bags, 5 wavy bronze bags.
vibrant brown bags contain 1 striped violet bag, 2 dull beige bags.
pale chartreuse bags contain 5 shiny gold bags, 4 dotted gold bags.
vibrant plum bags contain 4 mirrored gray bags, 1 bright silver bag, 3 bright cyan bags, 2 dull gray bags.
muted bronze bags contain 2 mirrored beige bags.
plaid green bags contain 3 striped tan bags, 4 drab maroon bags.
dark orange bags contain 4 drab beige bags, 1 striped beige bag, 1 dim indigo bag.
bright olive bags contain 4 bright turquoise bags.
drab indigo bags contain 4 striped tan bags, 5 dotted gold bags, 4 shiny crimson bags, 2 dull chartreuse bags.
light teal bags contain 5 dotted orange bags, 3 posh brown bags, 3 shiny gold bags.
dotted crimson bags contain 5 posh turquoise bags, 1 clear salmon bag, 5 faded salmon bags.
shiny red bags contain 4 bright blue bags, 2 posh lime bags, 5 shiny plum bags.
dark brown bags contain 5 posh magenta bags.
drab violet bags contain 5 posh indigo bags, 2 light chartreuse bags, 2 vibrant crimson bags.
plaid beige bags contain 3 drab olive bags, 5 dim fuchsia bags, 5 wavy turquoise bags.
bright plum bags contain 2 mirrored salmon bags, 4 faded tan bags.
plaid lavender bags contain 2 striped coral bags, 1 light coral bag.
shiny brown bags contain 2 wavy tan bags, 1 pale salmon bag, 2 clear bronze bags.
clear turquoise bags contain 2 dotted beige bags.
wavy orange bags contain 4 shiny green bags, 1 pale magenta bag, 4 dark plum bags, 4 mirrored olive bags.
vibrant turquoise bags contain 3 dotted black bags, 4 wavy salmon bags.
posh olive bags contain 1 dull black bag.
pale red bags contain 5 plaid tomato bags.
dim gold bags contain 5 wavy violet bags.
dotted fuchsia bags contain 4 pale plum bags, 2 dim salmon bags, 2 clear salmon bags, 4 vibrant blue bags.
wavy indigo bags contain 3 muted fuchsia bags, 1 drab maroon bag.
clear chartreuse bags contain 3 mirrored olive bags, 1 posh yellow bag, 1 faded salmon bag, 5 drab salmon bags.
drab red bags contain 2 faded lime bags, 3 bright fuchsia bags, 5 bright olive bags, 2 striped maroon bags.
dotted turquoise bags contain 5 dull white bags, 3 bright olive bags, 4 clear crimson bags.
muted coral bags contain 1 posh green bag, 4 dim violet bags, 2 faded silver bags, 3 dim plum bags.
plaid olive bags contain 2 striped cyan bags, 4 drab red bags, 2 clear beige bags, 5 plaid coral bags.
vibrant indigo bags contain 1 vibrant maroon bag.
clear olive bags contain 3 vibrant purple bags, 3 plaid green bags.
light blue bags contain 5 plaid lavender bags, 1 mirrored violet bag, 4 muted yellow bags.
muted turquoise bags contain 3 plaid brown bags, 5 clear aqua bags, 5 drab silver bags.
muted cyan bags contain 5 shiny fuchsia bags.
plaid aqua bags contain 3 posh green bags, 2 dull crimson bags.
dull teal bags contain 2 drab red bags.
dim olive bags contain 3 dark plum bags.
bright black bags contain 4 shiny salmon bags, 3 dull white bags, 4 clear brown bags.
mirrored maroon bags contain 1 drab turquoise bag, 2 plaid red bags, 3 faded black bags.
pale plum bags contain 1 dark salmon bag.
posh magenta bags contain 4 bright tan bags.
faded tan bags contain 1 pale magenta bag, 1 drab beige bag, 2 dull beige bags, 1 shiny silver bag.
dark coral bags contain 4 shiny orange bags, 2 dull green bags, 2 dim crimson bags.
plaid silver bags contain 2 dim black bags, 2 mirrored tan bags, 4 shiny plum bags, 4 wavy teal bags.
dim gray bags contain 3 dull green bags, 3 dull white bags, 2 clear yellow bags.
clear magenta bags contain 5 pale chartreuse bags, 5 light magenta bags, 4 mirrored gray bags.
posh coral bags contain 1 muted plum bag, 4 dim turquoise bags.
dim yellow bags contain 3 striped white bags.
mirrored tan bags contain 1 dim cyan bag, 3 wavy purple bags.
vibrant olive bags contain 5 striped fuchsia bags, 3 shiny silver bags.
pale cyan bags contain 5 vibrant bronze bags, 2 clear crimson bags, 1 dim violet bag.
vibrant teal bags contain 1 pale white bag, 5 clear gold bags, 2 striped white bags.
shiny gold bags contain 1 shiny coral bag, 5 posh white bags, 3 wavy cyan bags.
dim lime bags contain 1 bright turquoise bag.
posh salmon bags contain 1 dotted aqua bag, 3 faded cyan bags.
vibrant yellow bags contain 4 dim violet bags, 2 striped bronze bags, 3 clear crimson bags.
dull magenta bags contain 5 clear green bags.
bright orange bags contain 1 bright indigo bag, 3 clear tan bags, 5 dark brown bags.
mirrored blue bags contain 3 dotted aqua bags, 4 dotted magenta bags.
clear salmon bags contain 5 striped chartreuse bags, 5 drab brown bags.
light tan bags contain 3 drab orange bags, 5 posh purple bags, 3 faded plum bags.
dark purple bags contain 2 dim plum bags, 4 dark beige bags, 1 dull tomato bag, 4 dull gray bags.
shiny maroon bags contain 3 dotted aqua bags.
faded lime bags contain 2 light turquoise bags.
mirrored yellow bags contain 4 muted orange bags, 4 shiny black bags, 1 shiny green bag.
bright yellow bags contain 1 plaid bronze bag, 2 shiny gold bags.
striped crimson bags contain 5 dotted black bags.

611
src/2020/files/P8.txt Normal file
View File

@ -0,0 +1,611 @@
jmp +265
jmp +326
acc +41
acc +21
nop +255
jmp +104
jmp +563
jmp +568
acc -12
acc -7
jmp +9
jmp +3
acc -8
jmp +360
acc -10
acc +35
jmp +527
acc +27
jmp +176
jmp +511
acc +27
acc -18
acc +7
jmp +272
jmp +1
acc +45
jmp -24
acc +47
jmp -26
jmp +344
acc -17
acc +26
acc -7
jmp +193
acc +45
jmp +238
acc +13
acc +0
acc -13
acc +33
jmp +381
acc +16
acc -11
acc +14
acc +21
jmp +194
acc +48
acc +14
nop +271
jmp -8
acc +24
acc -6
acc +36
jmp +501
jmp -35
jmp +1
jmp +294
acc -3
jmp +181
nop +371
acc -12
jmp +198
nop +120
jmp +108
acc +45
acc +46
nop +193
jmp +346
acc +30
acc +26
jmp +200
acc +0
nop +187
acc +31
acc +30
jmp +40
acc +39
acc +2
acc +40
jmp +316
jmp +279
acc +0
acc +11
jmp +120
acc +32
nop +336
acc +13
jmp +178
acc -11
jmp +144
jmp +136
acc -3
nop +245
acc +34
jmp -23
acc -5
acc -11
jmp +217
acc +28
acc +22
acc +18
jmp +329
jmp +1
nop +350
nop -45
acc +13
jmp -87
acc -13
jmp +479
acc +31
acc -19
nop +342
jmp -78
acc +18
jmp +1
jmp +1
acc +18
jmp +278
nop +328
acc +6
jmp +1
acc -11
jmp +77
jmp +4
acc +32
acc +48
jmp +188
acc +14
acc +32
jmp +122
acc -6
acc -16
jmp -42
acc +32
acc +26
acc +33
jmp +48
acc +3
jmp +1
jmp +163
acc +34
acc +17
jmp -58
nop +254
acc +26
jmp +223
acc +7
nop +94
acc +12
jmp +433
acc +30
acc -17
acc +3
acc +50
jmp -95
jmp +1
acc +42
jmp -146
acc +12
acc +33
jmp -101
acc +18
jmp +244
nop +243
jmp -130
acc -8
jmp +55
acc +39
acc +45
nop +2
jmp +239
acc -19
acc +23
acc +36
jmp +59
acc -14
acc +29
jmp -158
acc +31
acc +6
jmp +223
jmp +126
jmp +306
jmp +214
acc -16
jmp +102
acc -6
acc +19
jmp -174
jmp +283
acc -13
acc +12
acc -8
jmp +72
jmp +252
acc +16
acc +26
nop -19
jmp +377
jmp -15
acc -7
acc +34
jmp +352
jmp -101
jmp -154
acc +32
nop -1
acc +49
jmp -167
jmp +110
jmp +127
acc -3
acc +17
jmp +330
acc +27
jmp -50
acc +25
acc +8
acc +21
acc +4
jmp +189
jmp -157
nop +231
acc +27
acc +27
jmp +77
acc +6
jmp -198
nop +274
acc -16
acc +31
acc +5
jmp +122
jmp -30
nop -79
acc +43
acc +24
acc -1
jmp +349
jmp +80
jmp +352
acc +15
acc +6
acc +46
acc -11
jmp -35
acc -9
acc -16
acc +22
nop -71
jmp +280
acc +28
acc +17
jmp +127
acc -15
acc +14
acc +0
acc +45
jmp +311
acc -19
jmp +309
acc +36
acc +7
nop +102
jmp -31
nop +278
nop +259
acc +35
jmp -86
jmp +1
jmp +84
acc +30
jmp -111
jmp +263
acc -14
acc -8
acc +7
jmp -263
jmp -259
jmp -14
acc +26
acc +4
jmp -56
acc +31
acc +49
acc +42
jmp +263
acc -15
acc -13
acc -7
acc +35
jmp +270
acc -3
acc +31
jmp -148
acc +8
acc +14
jmp -247
acc -1
nop +255
acc -15
jmp +140
acc +38
nop +106
acc +29
jmp +244
jmp +62
acc +5
nop -218
acc +47
acc -18
jmp +208
nop +47
jmp +46
acc +27
jmp +126
acc +50
nop +129
jmp -147
nop -278
jmp +1
acc +37
acc -17
jmp +17
acc +18
acc +21
jmp -121
acc +12
acc +37
acc +48
acc +24
jmp -176
acc +18
acc -3
nop -169
acc -4
jmp +23
acc +42
jmp +30
jmp +15
acc +33
acc +33
acc +36
acc -7
jmp +262
acc -16
jmp -27
acc -14
jmp +17
jmp -79
jmp +242
acc +1
acc -12
jmp -3
acc +11
acc +44
nop -254
jmp +52
jmp -294
acc -9
acc +50
acc -9
jmp -229
acc +6
jmp +211
nop -132
jmp +136
jmp +74
acc +39
acc +18
jmp +51
nop -281
jmp -211
nop -19
jmp +114
nop -97
jmp +1
nop -282
acc +45
jmp +30
jmp -191
acc -13
acc -4
acc -8
jmp +159
acc +36
acc +21
acc -13
acc +3
jmp -266
acc +45
acc +29
nop -55
acc +39
jmp +121
jmp +58
jmp -101
acc -17
acc +44
jmp -319
acc -15
acc -7
jmp -132
acc +31
jmp +165
jmp -191
jmp +87
acc +23
jmp +54
acc +6
nop -330
jmp +26
jmp -9
acc +43
acc +50
acc +49
jmp +63
jmp +1
acc -6
acc +17
jmp -311
acc +50
acc -13
acc -15
acc +33
jmp -279
acc +7
acc -7
acc +40
jmp -374
acc +18
acc -14
acc +42
jmp -106
acc +49
acc +50
jmp -156
jmp -314
acc +28
acc +49
jmp +114
acc +15
jmp -12
acc +11
acc +9
jmp -386
jmp +1
jmp -376
acc +6
acc -9
acc -2
acc +49
jmp +36
acc -2
jmp +1
acc -2
jmp -361
acc -14
acc -16
nop -452
acc +40
jmp -107
nop -378
acc -17
acc +26
acc -11
jmp -272
acc +9
acc +8
acc +20
acc -19
jmp -106
acc -13
jmp -466
acc +40
acc +43
acc +28
acc +24
jmp +15
acc +21
nop -456
acc +7
jmp -97
acc +46
jmp +1
acc -5
acc +49
jmp +38
acc +42
jmp -470
acc +33
acc -10
jmp +57
acc -19
acc +10
acc +29
jmp -218
acc +2
acc +19
acc -4
acc -16
jmp -187
acc +41
acc +16
jmp -414
acc +30
acc +1
jmp -229
acc -2
acc +42
jmp -269
acc +39
acc -2
acc +7
jmp -300
jmp -301
acc -4
jmp +1
jmp -357
acc +22
acc +47
jmp +4
acc +45
nop -428
jmp -115
nop -402
jmp -312
acc -3
acc +2
jmp -345
acc +49
acc -12
acc +30
acc +21
jmp -335
jmp -440
acc -8
acc +24
jmp -30
acc -14
acc +32
acc +11
jmp -188
nop -7
acc +15
acc -14
jmp +53
acc +5
jmp -366
acc -13
acc +24
jmp -492
acc +38
jmp -258
acc +47
jmp -40
nop -485
acc -13
acc -2
acc +0
jmp -154
acc +25
acc +38
acc +47
jmp -257
acc +0
acc +37
acc +32
jmp -549
acc +15
acc +29
acc +29
acc +5
jmp -111
jmp -392
acc +15
acc +24
acc +38
jmp +9
nop -299
nop -381
jmp -552
acc +50
nop -488
acc +45
jmp -305
jmp -404
acc +34
jmp -410
acc +15
acc +25
jmp -332
acc +2
jmp -388
acc +31
acc +45
nop -555
nop -247
jmp -248
acc +3
jmp -576
acc +22
nop -420
acc +36
acc +33
jmp -372
nop -551
acc +27
nop -567
nop -554
jmp +1

1000
src/2020/files/P9.txt Normal file

File diff suppressed because it is too large Load Diff