Education + Jobs Hiring Website - 2025
0 like 0 dislike
71 views

ago in Online Assessments by Expert (139,050 points) | 71 views

1 Answer

0 like 0 dislike
greedy-suffix approach
sort all capacity
assign each task a processor using lower_bound()
then use suffix sum array for these assigned tasks
ans = max(ans,(sum+(m-i)-1/(m-i)) //ceil operation
now return 2*ans-1 //ans-1 for waiting too
ago by (180 points)