Painter problem


what is the correction needed

the start variable is wrongly initialised
it should be equal to max value of the array

also take a ans%10000003 before multiplying to t
also also take mode after muliplication