I am trying to solve Uva -1136
Link : 1136
My Approach :
I am using A segment tree ,each containing Maximum Value of The range. For each box, I am finding The smallest index ,where I can load Star-ship , Then update
But ,Getting TLE , (Time Limit : 18s )
Please Suggest Any Faster Update Method
My code : Code