1676E — Eating Queries TLE

Revision en1, by celestialidiot, 2022-07-03 09:51:04

Hi,

Problem : 1676E — Eating Queries

My Approach : I sorted the array in descending order and then calculated the prefix sum, and then I am using binary search to find the least element greater than x.

Can anyone please tell me why my code is giving TLE.

My Code

Thanks.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English celestialidiot 2022-07-03 09:51:04 434 Initial revision (published)