Help needed in Codeforces Div2 1061 C2

Правка en1, от alyosha, 2025-10-25 18:51:32

https://mirror.codeforces.com/contest/2154/submission/345771218, this is my solution of the problem. I am not sure why it's failing I am using the exact same idea as in editorial. It's giving TLE due to some implementation error. Can you someone please correct. Any input is welcome. I have tried to comment the code a bit to make the parts of it understandable. Please ask for any clarification if needed. Thanks

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский alyosha 2025-10-25 18:51:32 448 Initial revision (published)