Issue with the code

Can you pls tell what am i doing wrong here?

hello @pradhumangupta99
dont sort the array because painter are not allowed to paint any blocks.
they can only paint contingous blocks.

u r search space should s=max_element_in_array * time , e=sum of array element * t

do this changes and it will work.

It Didnt help, results got worse

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.