I'm an idiot and made today's far harder for myself on accident
Then I went to describe the logic in a comment and realized I could have done things a chunk faster and far earlier, and with far easier to follow logic. Ah well.
Now the solution is practically instant. Heh.
Dropping this here just to show how convoluted it was.
tl;dr, I was tracing the top and the bottom, thinking I needed to check the bounds from an earlier bad assumption about what was needed to solve the problem.
Also goofed: I ran it first time for a ship of size 1000, not 100; amazingly, it completed without taking too long.
how instant is "practically instant"?
2.5s (measured by hand, w/o benchmark)
Compared to... maybe 10-20s the other way?
i tried to get tangents of both edges then find the corner with simple math. but no luck because errors were so significant...
went with trigonometry at first too, but was too imprecise.
I am still hitting a brick wall on day 18. Nothing I do to my code is reducing the search-space enough.
At this point, my code is so long and convoluted I'm tempted to start over from square 0.
same here, lest 1 cache idea for tomorrow. Already have like 500 lines of code for different bfs/dfs/a*/dj combinations :harold:
yes
which solve samples with times like: 2,7,7,∞,30 msec :kappa:
and even if you do find 1 path early - still need to +- exhaust the rest of the space "just in case"