Need Help in optimizing my code from Div-2 D Problem round #388

Revision en1, by fakeac, 2016-12-20 17:12:08

Here is my code for this problem — http://codeforces.com/contest/749/problem/D from Div-2 D round #388 Here is my submission --> http://codeforces.com/contest/749/submission/23178341 My code is well commented and as per the editorial given. It is taking too much time. The complexity is O(nlog(n)). How do I optimize my code? What operation/operations are taking too long ? Please Help! Thanks in advance.

Tags data structure, set, binary seach

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English fakeac 2016-12-20 17:12:08 476 Initial revision (published)