Can u please help ,e figure out whats wrong in this struck at it.couldnt find the mistake

hello @sneha23

a) use long long in place of int to avoid overflow

b) u r asked to print ans % some mod value but u r printing ans

c) why r u multiplying arr[i] by 5 , u need to read t and use t in place of 5

d) Dont sort the array because painters are allowed to paint only contiguos blocs

e) search space s=find max in array * t , e=summation of array *t

image

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.