Forgot to commit the last few days

This commit is contained in:
2025-12-12 06:23:45 +01:00
parent 50ca045070
commit ff3a3309a2
14 changed files with 1850 additions and 2 deletions

24
2025/Day10/Day10.lua Normal file
View File

@@ -0,0 +1,24 @@
-- Advent of Code 2025 - Day 10 - Bas Grolleman
require("functions")
local filename = "Day10/test"
print("Day 10")
local input = {}
for line in io.lines(filename) do
local switches = string.match(line, "%[([#.]+)%]")
local buttons = {}
for b in string.gmatch(line, "%(([%d,]+)%)") do
local sw = {}
for j in string.gmatch(b, "%d+") do
table.insert(sw, tonumber(j))
end
table.insert(buttons, sw)
end
table.insert(input, {
switches = switches,
buttons = buttons,
})
end
print_table(input)

0
2025/Day10/full Normal file
View File

3
2025/Day10/test Normal file
View File

@@ -0,0 +1,3 @@
[.##.] (3) (1,3) (2) (2,3) (0,2) (0,1) {3,5,4,7}
[...#.] (0,2,3,4) (2,3) (0,4) (0,1,2) (1,2,3,4) {7,5,12,7,2}
[.###.#] (0,1,2,3,4) (0,3,4) (0,1,2,4,5) (1,2) {10,11,11,5,10,5}