Metadata
-
Date
-
Tagged
-
Part of series
- Advent of Code 2024 Day 1
- Advent of Code 2024 Day 2
- Advent of Code 2024 Day 3
- Advent of Code 2024 Day 4
- Advent of Code 2024 Day 5
- Advent of Code 2024 Day 6
- Advent of Code 2024 Day 7
- Advent of Code 2024 Day 8
- Advent of Code 2024 Day 9
- Advent of Code 2024 Day 10
- Advent of Code 2024 Day 11
- Advent of Code 2024 Day 12
- Advent of Code 2024 Day 13
- Advent of Code 2024 Day 14
- Advent of Code 2024 Day 15
- Advent of Code 2024 Day 16
- Advent of Code 2024 Day 17
- Advent of Code 2024 Day 18
- Advent of Code 2024 Day 19
- Advent of Code 2024 Day 20
- Advent of Code 2024 Day 21
- Advent of Code 2024 Day 22
- Advent of Code 2024 Day 23
- Advent of Code 2024 Day 24
- Advent of Code 2024 Day 25
-
Newer post
Advent of Code 2024 Day 25
Day 25: Crossed Wires
https://adventofcode.com/2024/day/25
Back to the place where we started the search, the Chief Historian’s office.
The door is locked. An elf hands you schematics for every lock and every key used on the North Pole
An example input looks like this:
A #
is solid, a .
is empty space.
-
Keys start from the bottom (so they have
.
at the start of their block). -
Locks start from the top (so they have
#
at the start of their block). -
Each lock has 5 pins (columns in a block)
-
Each lock is 7 deep (rows in a block)
Parsing
Represenging the input as 2 sets, one for locks and one for keys.
Per block:
For each column, I count the amount of space that is filled.
Part 1
The question asks how many lock/key combinations do not have overlapping filled space.
For any key/lock combination:
The amount of filled space in any column cannot be greater than the height of the lock.
Part 2
This part is very secret.
It started snowing, have a great year, and see you next year for more Advent of Code!