https://ide.codingblocks.com/s/240623 . it does not produce the correct output I think that there is some problem in the main function.
Please check the below code of painter partition
hi @rohitkandpal683,
these are the errors in your code:
- you did not take MOD
- you don’t have to compute per unit time and since you are computing assuming the painter take 1 unit time to paint a block so when printing answer you need to multiply it with t (t = Time taken to print each board by one painter)
- take long long as answer since the sum can be large
i have corrected your code :- https://ide.codingblocks.com/s/240719