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