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

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

I think my solution has a time complexity of O(nlogn) as I am doing binary search on answer but it still gives TLE, why is it giving TLE . This is the problem link:- https://codeforces.net/contest/126/problem/B

This is my solution:- https://codeforces.net/contest/126/submission/271378723

Please help in this

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

»
5 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

The function f works in "n square" complexity in the worst case for comparing deque again and again.