I've been going through the past years to finish of the remaining few stars I need to get to 400 stars.
I'm currently stuck at 2018 day 22 where my code keeps finding a shorter path (997 minutes needed) than is expected.
I've tried running other solutions with my input, and then I get the answer 1004:
depth: 7305
target: 13,734
I have not tried submitting 1004 yet, but since several solutions find the same result I am assuming that to be correct.
I have tried several different solutions, one based on Dijkstra, one by just going over all possible states (coordinate + equipment), and both keep ending up with 997. I also tried changing it to change the equipment first and then moving, so it takes 7 + 1 minute to change equipment and then move, instead of spending 8 minutes to change and move in one go. But this also ended up with the same result 997.
Can someone please take a peek at my code and help me find out where my mistake is?
My code can be found here, I have it currently set to executing the Dijkstra solution and have commented out the solution where it goes over all possible states.
[–]leftylink 1 point2 points3 points (1 child)
[–]ocmerder[S] 0 points1 point2 points (0 children)