TLE in Codeforces Round 171 div 2 — Problem 2 (Books)

Revision en1, by shyam81295, 2016-02-26 22:58:40

I have implemented sliding window method in this problem, but there's TLE for testcase 9 . This is the link. I know the solution is wrong, but I want to know where I am going wrong, so that I shouldn't repeat same mistake again. It would be nice if someone of you will guide me to resolve this issue. Thanking in advance.

Tags two pointers, brute force

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English shyam81295 2016-02-26 22:58:40 437 Initial revision (published)