advent-of-code/2024/22/README.md
2024-12-25 12:59:49 +01:00

21 lines
703 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Struggled on the fact that "rounding *down* to the **nearest** integer" doesn't mean `round()` it means `floor()` for part1.
Got the idea in the back of my mind this is the thing that could be heavily paralellized.
For part2 I found a solution that would take 12h in brute force.
Removing a list creation I got it down to 3 hours (`two_bf.py`). I let this run in the background.
Using numpy shenanigans I got it down to 20 minutes.
It worked before I could do further optimisation.
I have no fucking idea what could be the optimisations here,
and not super interested in figuring out. I'll spoil myself.
---
OH
🤚: buyer × buyer's sequences
👉: all possible sequences × buyers
Yeah alright