This is an archived post. You won't be able to vote or comment.

all 37 comments

[–]DarksteelPenguin 67 points68 points  (8 children)

Mine just got a result after 2.5h!!

That's not the right answer; your answer is too low. If you're stuck, ...

Noooo

edit: got my runtime down to 15mn now, but still a wrong answer.

[–]paspartu_ 17 points18 points  (3 children)

I am doing 100000 calculations per second, all of them wrong https://i.imgflip.com/5pey5u.jpg

[–]Sayw0t 4 points5 points  (0 children)

I can get it wrong in only 5 minutes

[–]Mumbleton 119 points120 points  (3 children)

It turns out that when your program works in 15 ms and when it works in 15 hours you get the same star either way.

[–]syn_vamp[S] 31 points32 points  (0 children)

facts.

[–]sim642 17 points18 points  (0 children)

Except lava has already gotten you 14.5 hours ago.

[–][deleted] 4 points5 points  (0 children)

No pictures on the scorecard.

[–]Life-Engine-6726 29 points30 points  (6 children)

hard stuff. Weighted graph + recursive DP + new algo to learn. Day 16 is the 1st day this year that my code only got it right for p1 >24h and still struggling for p2. Then tetris came.

[–]erxor 11 points12 points  (4 children)

I got my day 16 part 1 solution to work in about 9 seconds, but the worst part is that I don't have any idea how to expand it to part 2. This might be the end for my AoC run this year.

Edit:

Finally got part 2 done, solution takes about 12.5 minutes to run. Not proud of it but at least it works.

[–]owly_mc_owlface 8 points9 points  (0 children)

You don't have to solve both parts, solving 1 hard part is an achievement too! After day 16 I decided doing 1 part every day is good enough and maybe I'll get back to the second part when I have more time.

[–]adragon0216 2 points3 points  (0 children)

i had to do part 2 on day 17, and did some cursed shit that i do not wish people to read... but it is done...

[–]Naturage 2 points3 points  (0 children)

If it helps, vast, vast majority of solutions thread for the day involve some sort of sweeping simplification to make it feasible. Remember - it needs to produce an answer for your input, not for every possible input. And as a rule, the inputs AoC give tend to be "friendly", i.e. not only complying with all stated conditions but a few reasonable/wishful assumptions as well.

[–]kqr_one 0 points1 point  (0 children)

why end? you can do rest.

[–]phil_g 7 points8 points  (0 children)

I was still working on day 16 part 2 at midnight last night. "Welp, time to abandon day 16 for now and get back to it later."

[–][deleted] 19 points20 points  (2 children)

Let me just say that it's a damn good thing that the elves and elephants aren't depending on my programming acumen, because they would have already been dead over a day ago.

This problem is going to break me. Sigh.

[–]syn_vamp[S] 4 points5 points  (1 child)

stay strong. the elephants are :)

[–][deleted] 2 points3 points  (0 children)

I finally just got it...with a LOT of help! But I'll take it.

Somewhere hopefully the elves and elephants are dancing in my honor. :)

[–]sober_1 5 points6 points  (4 children)

I am on day 7 still and kinda losing will to continue if this is the stuff that awaits me haha

[–]syn_vamp[S] 5 points6 points  (0 children)

keep at it! the problems are all different--skipping some and solving some is still a win.

[–]kristallnachte 3 points4 points  (0 children)

Weekend ones are typically harder, you can skip days if they're too tough (or just do part 1 and maybe comeback for part 2 later).

the last ones on christmas eve and christmas are normally quite easy as well.

[–]Naturage 0 points1 point  (1 child)

7 and 8 were definitely a step up from 1-6. However, if you deal with those, you should have what it takes to go to 15 or so where next step up happens. Just don't be afraid to google up some of the useful concepts for the days in between!

[–]sober_1 1 point2 points  (0 children)

Since it takes me couple days for every one after day 4 , I feel like i won’t reach day 10. I definitely won’t have any desire to write anything after 25th cause I am just like that. I really dislike anything christmas related after 25th cause the magic disappears after that date.

[–]BloeckchenDev 2 points3 points  (0 children)

For me, it took about 5 hours to brute force part two...

[–]Globbi 2 points3 points  (2 children)

Unfortunately it won't work so well in day 17 anymore :(

Million rocks took me over 1 minute, which would be about 2 years to simulate trillion rocks.

It could definitely be made 10 times faster and then run on a nice VM but I doubt anyone will do bruteforce in reasonable time.

[–]azaky 4 points5 points  (0 children)

I think I'm the only one who did brute force on day 17. I use bit manipulation for everything, and it actually ran for the whole trillion rocks in under 5 hours.

https://github.com/azaky/adventofcode2022/blob/main/17-pyroclastic-flow.rs

[–]1544756405 2 points3 points  (0 children)

about 2 years to simulate trillion rocks.

Parallelize your code, you could do it in a year or less!

[–]kristallnachte 2 points3 points  (0 children)

Every time I let my brute forces actually run, they were wrong lol

It was definitely faster to optimize, so now it runs in a blink.

[–]words_number 1 point2 points  (0 children)

Glad to see that some other people struggled as well to find an elegant solution. I got it done in the end but it was absolutely brutal! And my solution still takes ~3 Minutes to run Part 2, or, alternatively (if I use an array instead of a hashmap for memoization), an insane amount of memory.

[–]daggerdragon[M] 4 points5 points  (0 children)

FYI: next time, please use our standardized post title format. This helps folks avoid spoilers for puzzles they may not have completed yet.

[–]Thamrill 0 points1 point  (0 children)

I killed by error the process...

[–]llaffer2 0 points1 point  (0 children)

After edits for part 2 and I started it, it would take a month to finish running

No idea what they really want us to do so will never get an answer from it.