Day 9: Movie Theater

Megathread guidelines

  • Keep top level comments as only solutions, if you want to say something other than a solution put it in a new post. (replies to comments can be whatever)
  • You can send code in code blocks by using three backticks, the code, and then three backticks or use something such as https://topaz.github.io/paste/ if you prefer sending it through a URL

FAQ

  • CameronDevOPM
    link
    fedilink
    arrow-up
    5
    ·
    5 天前

    Even with using geo in rust, i am still struggling, so no shame in using the library. I did get the solve in 2m32s, but I dont feel like this is optimal.

    Surely there is a better solution somewhere.

    • NominatedNemesis@reddthat.com
      link
      fedilink
      arrow-up
      2
      ·
      2 天前

      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 😄

      • CameronDevOPM
        link
        fedilink
        arrow-up
        2
        ·
        2 天前

        I find it helpful to use a library to get the solution, and then work backwards to replace the library. I got rid of geo and got mine down to milliseconds.