Help needed in finding python code bug

Правка en1, от harsh-apcr, 2024-03-18 20:09:51

Submission : https://codeforces.com/contest/1878/submission/252116337

I am new to python so I was practicing it on codeforces problems, the submission I referenced above is exceeding memory limits for very small values of $$$n$$$.

I think you don't need to really understand the problem statement, I suspect the problem is in implementation of segment tree. (as the solve() function really only has binary search which is implemented iteratively)

Any help will be appreciated

here is the code :

Spoiler

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский harsh-apcr 2024-03-18 20:09:51 1893 Initial revision (published)