What is the error
Painters problem
hello @chiragbaid7 ,
a) dont multiply ur array with t. becuase it might cause overflow . becuause t is constant and same for every element u can include it later in ur answer.
b) ur s should start from maximum element in given array .
c) use long long in place of int in all such questions which asks to tell answer by taking 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.