mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-18 19:13:27 +02:00
added day14 part2 prompt
This commit is contained in:
@@ -19,4 +19,5 @@ Day | Name | Type of Algo & Notes
|
||||
11 | Space Police | - More Intcode stuff... <br> - __2D Array/Slice manipulation__ and a bit of maths/graphing <br> - Implemented a __RotateGrid__ algo
|
||||
12 | The N-Body Problem | I like to call this a _(harmonic) frequency_ algo. Finding the harmonic frequency of multiple bodies/items and then finding the Least Common Multiple of those frequencies will tell you when all the bodies have returned to their initial state. <br> - I've used this approach for a leetcode problem about prisoners in jail cells too
|
||||
13 | Care Package | Intcode again! It's basically every other day... <br> - part1: 2D array manipulation again <br> - part2: holy algo, some logic to basically play Bricks game. <br> - This is more of a design question for how you manage state
|
||||
14 | Space Stoichiometry | __Weighted Graph and Breadth First Traversals__ <br> - Because not all of the products have a quantity of 1, it complicates the graph's data model. I ended up mapping the product/chemical name to a map of its stoichiometry where the product's number is positive & reactants were negative. <br> - part2: not just a simple division because of "extra byproducts" of generating each piece of fuel. I just let this brute force thing run for ~30 seconds...
|
||||
14 | Space Stoichiometry | __Weighted Graph and Breadth First Traversals__ <br> - Because not all of the products have a quantity of 1, it complicates the graph's data model. I ended up mapping the product/chemical name to a map of its stoichiometry where the product's number is positive & reactants were negative. <br> - part2: not just a simple division because of "extra byproducts" of generating each piece of fuel. I just let this brute force thing run for ~30 seconds...
|
||||
15 | Oxygen System | YAY INTCODE 🙄 <br>
|
||||
|
||||
@@ -82,3 +82,25 @@ Here are some larger examples:
|
||||
7 XCVML => 6 RJRHP
|
||||
5 BHXH, 4 VRPVC => 5 LTCX
|
||||
Given the list of reactions in your puzzle input, what is the minimum amount of ORE required to produce exactly 1 FUEL?
|
||||
|
||||
Your puzzle answer was 1185296.
|
||||
|
||||
--- Part Two ---
|
||||
After collecting ORE for a while, you check your cargo hold: 1 trillion (1000000000000) units of ORE.
|
||||
|
||||
With that much ore, given the examples above:
|
||||
|
||||
The 13312 ORE-per-FUEL example could produce 82892753 FUEL.
|
||||
The 180697 ORE-per-FUEL example could produce 5586022 FUEL.
|
||||
The 2210736 ORE-per-FUEL example could produce 460664 FUEL.
|
||||
Given 1 trillion ORE, what is the maximum amount of FUEL you can produce?
|
||||
|
||||
Your puzzle answer was 1376631.
|
||||
|
||||
Both parts of this puzzle are complete! They provide two gold stars: **
|
||||
|
||||
At this point, you should return to your Advent calendar and try another puzzle.
|
||||
|
||||
If you still want to see it, you can get your puzzle input.
|
||||
|
||||
You can also [Share] this puzzle.
|
||||
Reference in New Issue
Block a user