All test cases are wrong and also unable to understand problem


why did we multiply*time taken in s,e,and in noofpainter() also i think ans is not getting value in this code please help in correcting this.


here the code

I have simplified the use of time parameter
by simply multiplying at the end after calculating the answer
also its impt to take modulo since constraints are large

ll currentsum=0; ll painter=1; if(currentsum+arr[i] > ans) what is current sum here and what does this signify

also why we did %10000003 twice

kitna paint karke part ekh painter

((ans%10000003)*t)%10000003;

because
the ans variable may be large
so in order to avoid overflow
when ans* t is done
so we are reducing the values
then after ans*t
the result could be large hence again % is done

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.