Question

Sample Input 1
5 3
8
1
7
3
9
Sample Output 1
10
Sample Input 2
4 2
1
2
2
6
Sample Output 2
6
Meaning
n是货物的个数,k是卡车数,第一行输入这两个数,第n行是n个货物的分别的重要。让我们求出,卡车的最大运载量的最小值P。即能够装下这些货物,然后P的值又是最小的。

Sample Input 1
5 3
8
1
7
3
9
Sample Output 1
10
Sample Input 2
4 2
1
2
2
6
Sample Output 2
6