Advent of code 2023 - Day 7: Camel Cards
This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 7 - see https:adventofcode.com/2023/day/7
Part 1 #
Lets first read the task:
In Camel Cards, you get a list of hands, and your goal is to order them based on the strength of each hand. A hand consists of five cards labeled one of
...A
,K
,Q
,J
,T
,9
,8
,7
,6
,5
,4
,3
, or2
. The relative strength of each card follows this order, whereA
is the highest and2
is the lowest.Advent of code 2023 - Day 6: Wait For It
2024-01-04This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 6 - see https:adventofcode.com/2023/day/6
Part 1 #
Lets first read the task:
You manage to sign up as a competitor in the boat races just in time. The organizer explains that it’s not really a traditional race - instead, you will get a fixed amount of time during which your boat has to travel as far as it can, and you win if your boat goes the farthest.
...Advent of code 2023 - Day 5: If You Give A Seed A Fertilizer
2023-12-30This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 5 - see https:adventofcode.com/2023/day/5
Update
:
- substitute
get_generator()
(own implementation) withrange()
(Python inbuilt)- improve grid search so that it goes through all location ranges, still starting with the lowest range
Part 1 #
Lets first read the task:
The almanac (your puzzle input) lists all of the seeds that need to be planted. It also lists what type of soil to use with each kind of seed, what type of fertilizer to use with each kind of soil, what type of water to use with each kind of fertilizer, and so on. Every type of seed, soil, fertilizer and so on is identified with a number, but numbers are reused by each category - that is, soil
...123
and fertilizer123
aren’t necessarily related to each other.Advent of code 2023 - Day 4: Scratchcards
2023-12-19This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 4 - see https:adventofcode.com/2023/day/4
Part 1 #
Lets first read the task:
The Elf leads you over to the pile of colorful cards. There, you discover dozens of scratchcards, all with their opaque covering already scratched off. Picking one up, it looks like each card has two lists of numbers separated by a vertical bar (
...|
): a list of winning numbers and then a list of numbers you have. You organize the information into a table (your puzzle input).Advent of code 2023 - Day 3: Gear Ratios
2023-12-18This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 3 - see https:adventofcode.com/2023/day/3
Part 1 #
Lets first read the task:
The engine schematic (your puzzle input) consists of a visual representation of the engine. There are lots of numbers and symbols you don’t really understand, but apparently any number adjacent to a symbol, even diagonally, is a “part number” and should be included in your sum. (Periods (
....
) do not count as a symbol.)Advent of code 2023 - Day 2: Cube Conundrum
2023-12-11This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 2 - see https:adventofcode.com/2023/day/2
Part 1 #
Lets first read the task:
As you walk, the Elf shows you a small bag and some cubes which are either red, green, or blue. Each time you play this game, he will hide a secret number of cubes of each color in the bag, and your goal is to figure out information about the number of cubes.
...Advent of code 2023 - Day 1: Trebuchet?!
2023-12-10This year I try to record my attempt at solving the Advent of Code 2023 riddles. This is Day 1 - see https:adventofcode.com/2023/day/1
Part 1 #
Our first task is the following:
The newly-improved calibration document consists of lines of text; each line originally contained a specific calibration value that the Elves now need to recover. On each line, the calibration value can be found by combining the first digit and the last digit (in that order) to form a single two-digit number.
...