

I solved with geo as well. Brute force to all possible rectangles from the polygon points. Tried to run it but after 30 seckilled it and just imported rayon. It’s under 3 sec. There is no shame using libraries, it’s part of the puzzle to know whics one is useful 😄
Funny thing is, I would do that if there are no requirements, and the vibecode is unreadable. I would let the token-predictor create the requirements, after proof-reading and correcting it, I would create cooked-down list and run through a manager for approval, then rewrite it from scratch. My limited time and precious brain cells are too valuable to waste on reading and deciphering the half ton of sh!t an LLM produced.
If there are requirements (which are hardly applicable unfortunately) I would just rewrite the thing.