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

Автор gokulraaj59, история, 2 года назад, По-английски

code here have made this code in python its giving TLE on Test-16 -> and have also tried with Fast_IO and PyPy too code

please need solutions in python only.

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

»
2 года назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

I modified your code and it get accepted in python3 without using fastIO template also.
your code is full of operations that take O(n) like count , index and in operator.
so I replace them with bisect functions only to do this operations in O(logn).
so don't use this useless operations and use binary search.