Блог пользователя akash.garg2172

Автор akash.garg2172, история, 3 года назад, По-английски
Your code here...

I have tried this q :Aquamoon and Stolen String

And wrote the following code:

CODE

As per what I can observe my code is O(n*m) and in the q its mentioned that It is guaranteed that n is odd and that the sum of n⋅m over all test cases does not exceed 10^5.

But still my code is giving TLE in test case 2.

plz help me with its complexity

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

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

You are making vector ar of size 100005*30 T times

So if T is large your code will TLE

So make the vector ar only of size m as you are using no more