advent2022

Advent of Code 2022 Solutions
git clone git://bsandro.tech/advent2022
Log | Files | Refs | README | LICENSE

commit a42c6971ac09e52cad0910e25dcd8779ea366ba8
parent b4bb5765235fa0a949cf4702650a7f5081b8087a
Author: bsandro <email@bsandro.tech>
Date:   Mon, 19 Dec 2022 19:47:53 +0000

Day 19 inputs

Diffstat:
Aday19/input.txt | 30++++++++++++++++++++++++++++++
Aday19/sample.txt | 127+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 157 insertions(+), 0 deletions(-)

diff --git a/day19/input.txt b/day19/input.txt @@ -0,0 +1,30 @@ +Blueprint 1: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 2 ore and 16 clay. Each geode robot costs 4 ore and 16 obsidian. +Blueprint 2: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 14 clay. Each geode robot costs 4 ore and 8 obsidian. +Blueprint 3: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 18 clay. Each geode robot costs 4 ore and 16 obsidian. +Blueprint 4: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 7 clay. Each geode robot costs 2 ore and 7 obsidian. +Blueprint 5: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 7 clay. Each geode robot costs 2 ore and 16 obsidian. +Blueprint 6: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 17 clay. Each geode robot costs 4 ore and 8 obsidian. +Blueprint 7: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 20 clay. Each geode robot costs 2 ore and 19 obsidian. +Blueprint 8: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 10 clay. Each geode robot costs 4 ore and 10 obsidian. +Blueprint 9: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 4 ore and 19 clay. Each geode robot costs 4 ore and 7 obsidian. +Blueprint 10: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 19 clay. Each geode robot costs 3 ore and 13 obsidian. +Blueprint 11: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 2 ore and 12 clay. Each geode robot costs 3 ore and 15 obsidian. +Blueprint 12: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 14 clay. Each geode robot costs 4 ore and 11 obsidian. +Blueprint 13: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 10 clay. Each geode robot costs 2 ore and 10 obsidian. +Blueprint 14: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 16 clay. Each geode robot costs 3 ore and 14 obsidian. +Blueprint 15: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 20 clay. Each geode robot costs 3 ore and 14 obsidian. +Blueprint 16: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 10 clay. Each geode robot costs 2 ore and 14 obsidian. +Blueprint 17: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 6 clay. Each geode robot costs 2 ore and 10 obsidian. +Blueprint 18: Each ore robot costs 2 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 8 clay. Each geode robot costs 3 ore and 20 obsidian. +Blueprint 19: Each ore robot costs 2 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 20 clay. Each geode robot costs 3 ore and 14 obsidian. +Blueprint 20: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 8 clay. Each geode robot costs 2 ore and 10 obsidian. +Blueprint 21: Each ore robot costs 2 ore. Each clay robot costs 4 ore. Each obsidian robot costs 3 ore and 19 clay. Each geode robot costs 4 ore and 13 obsidian. +Blueprint 22: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 13 clay. Each geode robot costs 3 ore and 12 obsidian. +Blueprint 23: Each ore robot costs 3 ore. Each clay robot costs 4 ore. Each obsidian robot costs 2 ore and 20 clay. Each geode robot costs 4 ore and 7 obsidian. +Blueprint 24: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 7 clay. Each geode robot costs 3 ore and 9 obsidian. +Blueprint 25: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 13 clay. Each geode robot costs 2 ore and 9 obsidian. +Blueprint 26: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 7 clay. Each geode robot costs 4 ore and 17 obsidian. +Blueprint 27: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 19 clay. Each geode robot costs 3 ore and 17 obsidian. +Blueprint 28: Each ore robot costs 3 ore. Each clay robot costs 3 ore. Each obsidian robot costs 3 ore and 6 clay. Each geode robot costs 2 ore and 16 obsidian. +Blueprint 29: Each ore robot costs 4 ore. Each clay robot costs 4 ore. Each obsidian robot costs 4 ore and 7 clay. Each geode robot costs 2 ore and 19 obsidian. +Blueprint 30: Each ore robot costs 4 ore. Each clay robot costs 3 ore. Each obsidian robot costs 2 ore and 20 clay. Each geode robot costs 3 ore and 9 obsidian. diff --git a/day19/sample.txt b/day19/sample.txt @@ -0,0 +1,127 @@ +== Minute 1 == +1 ore-collecting robot collects 1 ore; you now have 1 ore. + +== Minute 2 == +1 ore-collecting robot collects 1 ore; you now have 2 ore. + +== Minute 3 == +Spend 2 ore to start building a clay-collecting robot. +1 ore-collecting robot collects 1 ore; you now have 1 ore. +The new clay-collecting robot is ready; you now have 1 of them. + +== Minute 4 == +1 ore-collecting robot collects 1 ore; you now have 2 ore. +1 clay-collecting robot collects 1 clay; you now have 1 clay. + +== Minute 5 == +Spend 2 ore to start building a clay-collecting robot. +1 ore-collecting robot collects 1 ore; you now have 1 ore. +1 clay-collecting robot collects 1 clay; you now have 2 clay. +The new clay-collecting robot is ready; you now have 2 of them. + +== Minute 6 == +1 ore-collecting robot collects 1 ore; you now have 2 ore. +2 clay-collecting robots collect 2 clay; you now have 4 clay. + +== Minute 7 == +Spend 2 ore to start building a clay-collecting robot. +1 ore-collecting robot collects 1 ore; you now have 1 ore. +2 clay-collecting robots collect 2 clay; you now have 6 clay. +The new clay-collecting robot is ready; you now have 3 of them. + +== Minute 8 == +1 ore-collecting robot collects 1 ore; you now have 2 ore. +3 clay-collecting robots collect 3 clay; you now have 9 clay. + +== Minute 9 == +1 ore-collecting robot collects 1 ore; you now have 3 ore. +3 clay-collecting robots collect 3 clay; you now have 12 clay. + +== Minute 10 == +1 ore-collecting robot collects 1 ore; you now have 4 ore. +3 clay-collecting robots collect 3 clay; you now have 15 clay. + +== Minute 11 == +Spend 3 ore and 14 clay to start building an obsidian-collecting robot. +1 ore-collecting robot collects 1 ore; you now have 2 ore. +3 clay-collecting robots collect 3 clay; you now have 4 clay. +The new obsidian-collecting robot is ready; you now have 1 of them. + +== Minute 12 == +Spend 2 ore to start building a clay-collecting robot. +1 ore-collecting robot collects 1 ore; you now have 1 ore. +3 clay-collecting robots collect 3 clay; you now have 7 clay. +1 obsidian-collecting robot collects 1 obsidian; you now have 1 obsidian. +The new clay-collecting robot is ready; you now have 4 of them. + +== Minute 13 == +1 ore-collecting robot collects 1 ore; you now have 2 ore. +4 clay-collecting robots collect 4 clay; you now have 11 clay. +1 obsidian-collecting robot collects 1 obsidian; you now have 2 obsidian. + +== Minute 14 == +1 ore-collecting robot collects 1 ore; you now have 3 ore. +4 clay-collecting robots collect 4 clay; you now have 15 clay. +1 obsidian-collecting robot collects 1 obsidian; you now have 3 obsidian. + +== Minute 15 == +Spend 3 ore and 14 clay to start building an obsidian-collecting robot. +1 ore-collecting robot collects 1 ore; you now have 1 ore. +4 clay-collecting robots collect 4 clay; you now have 5 clay. +1 obsidian-collecting robot collects 1 obsidian; you now have 4 obsidian. +The new obsidian-collecting robot is ready; you now have 2 of them. + +== Minute 16 == +1 ore-collecting robot collects 1 ore; you now have 2 ore. +4 clay-collecting robots collect 4 clay; you now have 9 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 6 obsidian. + +== Minute 17 == +1 ore-collecting robot collects 1 ore; you now have 3 ore. +4 clay-collecting robots collect 4 clay; you now have 13 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 8 obsidian. + +== Minute 18 == +Spend 2 ore and 7 obsidian to start building a geode-cracking robot. +1 ore-collecting robot collects 1 ore; you now have 2 ore. +4 clay-collecting robots collect 4 clay; you now have 17 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 3 obsidian. +The new geode-cracking robot is ready; you now have 1 of them. + +== Minute 19 == +1 ore-collecting robot collects 1 ore; you now have 3 ore. +4 clay-collecting robots collect 4 clay; you now have 21 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 5 obsidian. +1 geode-cracking robot cracks 1 geode; you now have 1 open geode. + +== Minute 20 == +1 ore-collecting robot collects 1 ore; you now have 4 ore. +4 clay-collecting robots collect 4 clay; you now have 25 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 7 obsidian. +1 geode-cracking robot cracks 1 geode; you now have 2 open geodes. + +== Minute 21 == +Spend 2 ore and 7 obsidian to start building a geode-cracking robot. +1 ore-collecting robot collects 1 ore; you now have 3 ore. +4 clay-collecting robots collect 4 clay; you now have 29 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 2 obsidian. +1 geode-cracking robot cracks 1 geode; you now have 3 open geodes. +The new geode-cracking robot is ready; you now have 2 of them. + +== Minute 22 == +1 ore-collecting robot collects 1 ore; you now have 4 ore. +4 clay-collecting robots collect 4 clay; you now have 33 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 4 obsidian. +2 geode-cracking robots crack 2 geodes; you now have 5 open geodes. + +== Minute 23 == +1 ore-collecting robot collects 1 ore; you now have 5 ore. +4 clay-collecting robots collect 4 clay; you now have 37 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 6 obsidian. +2 geode-cracking robots crack 2 geodes; you now have 7 open geodes. + +== Minute 24 == +1 ore-collecting robot collects 1 ore; you now have 6 ore. +4 clay-collecting robots collect 4 clay; you now have 41 clay. +2 obsidian-collecting robots collect 2 obsidian; you now have 8 obsidian. +2 geode-cracking robots crack 2 geodes; you now have 9 open geodes.