Why in problem like Spoj giveway and racetime , my merge sort tree solution getting TLE?

Revision en1, by Mac_prime, 2022-08-24 22:52:21

Problem Link: https://www.spoj.com/problems/RACETIME/

My solution Link: https://ideone.com/lfWNVt

it will be very helpful if someone analysis the time complexity of my solution

or give me some idea to solve these kinds of problem problems with the segment tree.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Mac_prime 2022-08-24 22:52:21 363 Initial revision (published)