.. | ||
one.py | ||
README.md | ||
two.py | ||
two_bf.py | ||
two_fast.py |
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