Need help in Cisco Icode round 2 problem

Revision en1, by unt311, 2021-04-08 23:13:38

This is a very cool problem with a short simple problem statement. I am getting TLE for a O(n * (logn)^2) solution.

Please provide a solution, or give suggestions to improve my solution (using binary search and segment tree)

Tags round2

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English unt311 2021-04-08 23:13:38 468 Initial revision (published)