#D3633. Optimal Tournament
Optimal Tournament
Optimal Tournament
Example
Input
4 3 1 3 4 7
Output
6
inputFormat
Input
4 3 1 3 4 7
outputFormat
Output
6
样例
4 3
1 3 4 7
6
Example
Input
4 3 1 3 4 7
Output
6
Input
4 3 1 3 4 7
Output
6
4 3
1 3 4 7
6
By signing up a OpenJudge universal account, you can submit code and join discussions in all online judging services provided by us.