PROGRAMMING:go down to posterity
Comrade Chuan Jianguo was very unconvinced when he was defeated in the general election. He thought that no one knew country m better than him, and no one knew war better than him. Therefore, he wanted to select excellent soldiers from the $$n $$army team to fight out the regime from the barrel of a powerful gun. To show that he knew everything, he chose only one person from each army to participate in the movement.
$$n $$each army has $$M $$individuals, and the combat effectiveness of each individual is recorded as $$W_{ i. J} $$, that is, the combat effectiveness of the j-th soldier of the i-th army is $$W_{ i,j}$$ 。** The total combat effectiveness is the sum of the combat effectiveness of the selected soldiers.
Understanding Wang announced to everyone that he had K ways to pick out the right people to complete the "great" movement, but knowing all of them, he didn't know the combat effectiveness of the other side at all. Therefore, please tell him, when there are * * k schemes * *, what are the upper and lower limits of * * enemy combat effectiveness * *?
###Input format:
In the first line, enter three positive integers $$n, m, K $$to represent the number of troops, the number of each army, and the number of schemes $$(n, m < = 2000,1 < = k < n)$$
Next N lines, m positive integers in each line represent combat effectiveness of each soldier $$W_{ i,j}(W_{ i,j}<=200000)$$ 。 Make sure the data has a solution
###Output format:
For each group of input, when the number of output schemes in a row is equal to $$k $$, the lower limit and upper limit of the enemy's combat effectiveness (no extra space at the end of the row)
###Input example:
Here is a set of inputs. For example:
```in
3 3 2
6 1 0
3 2 0
5 2 1
```
###Output example:
The corresponding output is given here. For example:
```out
12 13
```
###Tips:
When (6,3,5) is selected, the maximum combat effectiveness is 14; Secondly, the combat effectiveness of (6,2,5) is 13.
Therefore, when the enemy's combat effectiveness is within the range of [12,13], there are two schemes that can succeed
answer:If there is no answer, please comment
$$n $$each army has $$M $$individuals, and the combat effectiveness of each individual is recorded as $$W_{ i. J} $$, that is, the combat effectiveness of the j-th soldier of the i-th army is $$W_{ i,j}$$ 。** The total combat effectiveness is the sum of the combat effectiveness of the selected soldiers.
Understanding Wang announced to everyone that he had K ways to pick out the right people to complete the "great" movement, but knowing all of them, he didn't know the combat effectiveness of the other side at all. Therefore, please tell him, when there are * * k schemes * *, what are the upper and lower limits of * * enemy combat effectiveness * *?
###Input format:
In the first line, enter three positive integers $$n, m, K $$to represent the number of troops, the number of each army, and the number of schemes $$(n, m < = 2000,1 < = k < n)$$
Next N lines, m positive integers in each line represent combat effectiveness of each soldier $$W_{ i,j}(W_{ i,j}<=200000)$$ 。 Make sure the data has a solution
###Output format:
For each group of input, when the number of output schemes in a row is equal to $$k $$, the lower limit and upper limit of the enemy's combat effectiveness (no extra space at the end of the row)
###Input example:
Here is a set of inputs. For example:
```in
3 3 2
6 1 0
3 2 0
5 2 1
```
###Output example:
The corresponding output is given here. For example:
```out
12 13
```
###Tips:
When (6,3,5) is selected, the maximum combat effectiveness is 14; Secondly, the combat effectiveness of (6,2,5) is 13.
Therefore, when the enemy's combat effectiveness is within the range of [12,13], there are two schemes that can succeed
answer:If there is no answer, please comment