Painter Problem


Plz correct the following code i amnot getting my mistake

hello @aryamaan1011

a) dont use mod for calculation of upper, lower or for ur answer.
use of mod will make our search space non monotonic.

b) do this->
first calculate ur answer by considering t=1 , and let say u get answer as ans .
then simply print (ans * t)%mod

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.