mirror of
https://github.com/Threnklyn/advent-of-code-go.git
synced 2026-05-18 19:13:27 +02:00
day22 prompt and readme updates
This commit is contained in:
@@ -28,4 +28,4 @@ Day | Name | Type of Algo & Notes
|
||||
19 | Tractor Beam | - Another Intcode outputting to a 2D grid <br> - __THERE NEEDS TO BE A CONVENTION FOR X AND Y WHEN WORKING WITH 2D GRIDS__ This is awful, should it be mathematical? Should it represent rows and columns? Who knows?! <br> - Little geometry (drawing squares) for part2 but nothing crazy
|
||||
20 | Donut Maze | __Breadth first search__ path finding algo. Dijkstra's Algorithm to find the shortest path given a maze with "portals." <br> Part 2 is kind of wild with the maze become 3D, but the solution is effectively the same, just more complex to implement <br> - I remapped this in my head to more of a 3D cube instead of a donut... <br> - That was really cool to get working... Dare I say fun...
|
||||
21 | Springdroid Adventure | Another simple-ish Intcode based problem, this time using some weird __Assembly language__ that gets inputs via writing ASCII values to the Intcode computer.
|
||||
22 | Slam Shuffle | - Seems fairly easy at first... But the part 2 has numbers somewhere in the 32-bit number to 64-bit number range... So the part 1 code is pretty much useless...
|
||||
22 | Slam Shuffle | - Seems fairly easy at first... But the part 2 has numbers somewhere in the 32-bit number to 64-bit number range... So the part 1 code is pretty much useless... <br> I gave up on part 2. It's some crazy linear algebra with modular inverses?.. Theoretically it makes some sense.. but I had to read someone else's solution for hours to kind of understand the implementation...
|
||||
|
||||
@@ -133,3 +133,22 @@ Result: 9 2 5 8 1 4 7 0 3 6
|
||||
Positions within the deck count from 0 at the top, then 1 for the card immediately below the top card, and so on to the bottom. (That is, cards start in the position matching their number.)
|
||||
|
||||
After shuffling your factory order deck of 10007 cards, what is the position of card 2019?
|
||||
|
||||
Your puzzle answer was 3143.
|
||||
|
||||
--- Part Two ---
|
||||
After a while, you realize your shuffling skill won't improve much more with merely a single deck of cards. You ask every 3D printer on the ship to make you some more cards while you check on the ship repairs. While reviewing the work the droids have finished so far, you think you see Halley's Comet fly past!
|
||||
|
||||
When you get back, you discover that the 3D printers have combined their power to create for you a single, giant, brand new, factory order deck of 119315717514047 space cards.
|
||||
|
||||
Finally, a deck of cards worthy of shuffling!
|
||||
|
||||
You decide to apply your complete shuffle process (your puzzle input) to the deck 101741582076661 times in a row.
|
||||
|
||||
You'll need to be careful, though - one wrong move with this many cards and you might overflow your entire ship!
|
||||
|
||||
After shuffling your new, giant, factory order deck that many times, what number is on the card that ends up in position 2020?
|
||||
|
||||
Your puzzle answer was 3920265924568.
|
||||
|
||||
Both parts of this puzzle are complete! They provide two gold stars: **
|
||||
Reference in New Issue
Block a user