Day 9: Movie Theater

Megathread guidelines

FAQ

  • CameronDevOPM
    link
    fedilink
    arrow-up
    5
    ·
    3 个月前

    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
      ·
      3 个月前

      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
        ·
        3 个月前

        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.