Can anyone help me to solve 279C? I got WA in test case-21 and cannot figure out why?

Revision en1, by shahincsejnu, 2020-06-03 12:51:16

I was trying to solve 279C

but getting WA in test case-21, the case is huge that is why cannot figure out why getting WA.

My Approach : First i find out all ladder segment using two-pointer technique, then i used binary search to find whether the given segment is in any ladder segment. I think my logic correct but still why getting WA. My Code

Tags help, 279c

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English shahincsejnu 2020-06-03 12:51:16 555 Initial revision (published)