Блог пользователя ravi_sumit33

Автор ravi_sumit33, история, 3 месяца назад, По-английски

My submission for problem E of Codeforces Round 971 (Div. 4) was exactly the bonus solution mentioned in the editorial. I spent around 1 hour debugging during the contest but the last sample case was failing. After the contest I submitted the same solution and it passed (maybe because codeforces use gcc?). I believe there is some precision bug in Apple clang. Can anyone else try this on the last sample test?

** Please ignore the excessive use of long double. I was getting panicked :) **

Полный текст и комментарии »

  • Проголосовать: нравится
  • -8
  • Проголосовать: не нравится

Автор ravi_sumit33, история, 5 лет назад, По-английски

Hello Codeforces!

I was solving this problem and came up with an approach using set. I made submission but got TLE. If I am correct, time complexity of this submission is nlogn as total number of insert/erase operations in set is O(n) and logn for each upper_bound.

I know this approach is not the best one but considering constraints given in the problem, this should get an AC.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится