Belwo q soln in cpp(soln must or else dont ans)

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.
Constraints

1<=N<=100000
1<=K<=100000
1<=T<=1000000
1<=Li<=100000
Output Format

Return minimum time required to paint all boards % 10000003.
Sample Input

2 2 5
1 10

Sample Output

50

Explanation

The first painter can paint the first board in 5 units of time and the second painter will take 50 units of time to paint the second board. Since both can paint simultaneously , the total time required to paint both the boards is 50.

I am attaching the code here for this question, and would suggest you that from next time don’t directly demand for solutions. Come with an approach discuss your approach code it yourself and if failed then ask for solution

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.