We spent over one hour to find a bug where we had to just change the comparison symbol and figure out the precision problem, but we got this O(logn) solution. 🥹
Kendi and I started solving Codeforces: 3-4 questions (with rating 1500+) per week.
Here is the
problem if you are interested.