Painter Problem

Can anyone help me out with this problem. I am getting the wrong answer.
Test case 0,1,2 and 3 is passed but remainig test cases i.e. 4 and 5 failed.

LINK TO MY CODE

https://ide.codingblocks.com/s/422523

QUESTION

You have to paint N boards of length {A0, A1, A2, A3 … AN-1}. There are K painters available and you are also given how much time a painter takes to paint 1 unit of board. You have to get this job done as soon as possible under the constraints that any painter will only paint contiguous sections of board. Return the ans % 10000003

Input Format
First line contains three space seperated integers N,K and T ,where
N = Size of array,
K = No of painters available ,
T = Time taken to print each board by one painter
Next line contains N space seperated positive integers denoting size of N boards.

Test cases
2 2 5
1 10