From 5b8a738f2deb105ea6dba5939b90db1c1433bd5b Mon Sep 17 00:00:00 2001 From: Yann Ahlgrim Date: Tue, 31 Mar 2026 15:41:49 +0200 Subject: [PATCH] init problem --- 04-12-2025/main.go | 8 ++++++++ 04-12-2025/problem.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 04-12-2025/main.go create mode 100644 04-12-2025/problem.md diff --git a/04-12-2025/main.go b/04-12-2025/main.go new file mode 100644 index 0000000..0646d2d --- /dev/null +++ b/04-12-2025/main.go @@ -0,0 +1,8 @@ +package main + +import "fmt" + + +func main() { + fmt.Println("test") +} diff --git a/04-12-2025/problem.md b/04-12-2025/problem.md new file mode 100644 index 0000000..dfde5ba --- /dev/null +++ b/04-12-2025/problem.md @@ -0,0 +1,40 @@ +# Day 4: Printing Department + +You ride the escalator down to the printing department. They're clearly getting ready for Christmas; they have lots of large rolls of paper everywhere, and there's even a massive printer in the corner (to handle the really big print jobs). + +Decorating here will be easy: they can make their own decorations. What you really need is a way to get further into the North Pole base while the elevators are offline. + +"Actually, maybe we can help with that," one of the Elves replies when you ask for help. "We're pretty sure there's a cafeteria on the other side of the back wall. If we could break through the wall, you'd be able to keep moving. It's too bad all of our forklifts are so busy moving those big rolls of paper around." + +If you can optimize the work the forklifts are doing, maybe they would have time to spare to break through the wall. + +The rolls of paper (@) are arranged on a large grid; the Elves even have a helpful diagram (your puzzle input) indicating where everything is located. + +For example: + +..@@.@@@@. +@@@.@.@.@@ +@@@@@.@.@@ +@.@@@@..@. +@@.@@@@.@@ +.@@@@@@@.@ +.@.@.@.@@@ +@.@@@.@@@@ +.@@@@@@@@. +@.@.@@@.@. + +The forklifts can only access a roll of paper if there are fewer than four rolls of paper in the eight adjacent positions. If you can figure out which rolls of paper the forklifts can access, they'll spend less time looking and more time breaking down the wall to the cafeteria. + +In this example, there are 13 rolls of paper that can be accessed by a forklift (marked with x): + +..xx.xx@x. +x@@.@.@.@@ +@@@@@.x.@@ +@.@@@@..@. +x@.@@@@.@x +.@@@@@@@.@ +.@.@.@.@@@ +x.@@@.@@@@ +.@@@@@@@@. +x.x.@@@.x. +Consider your complete diagram of the paper roll locations. How many rolls of paper can be accessed by a forklift?