Need help in problem E — Greedy Shopping

Revision en1, by hurt_FOR_heart, 2020-11-18 18:31:04

Hello, at problem E last contest I have do segment tree and binary search which reach a good complexity O((n+q)log(maxY)log(n)) but i dont know why It just give me a TLE judgement on test 18 Maybe my poor implementation ? Or there's some infinite loop ? Or I just make a wrong calculation in complexity ? I still cant find my mistake so I hope u guy could help me. Here is my code: https://codeforces.me/contest/1440/submission/98824111 Thanks in advance.

Tags #help error, #tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English hurt_FOR_heart 2020-11-18 18:31:04 501 Initial revision (published)