CCC '16 S2 - Tandem Bicycle
Submit solution
C++, Python
Points:
1
Time limit:
2.0s
Memory limit:
256M
Problem types
Allowed languages
Sample Input 3
2
5
202 177 189 589 102
17 78 1 496 540Output for Sample Input 3
2016Explanation for Output for Sample Input 3
There are multiple possible optimal solutions. Here is one optimal solution:
- Pair the citizen from Dmojistan with speed \(202\) and the citizen from Pegland with speed \(1\) .
- Pair the citizen from Dmojistan with speed \(177\) and the citizen from Pegland with speed \(540\) .
- Pair the citizen from Dmojistan with speed \(189\) and the citizen from Pegland with speed \(17\) .
- Pair the citizen from Dmojistan with speed \(589\) and the citizen from Pegland with speed \(78\) .
- Pair the citizen from Dmojistan with speed \(102\) and the citizen from Pegland with speed \(496\) .
This sum yields \(202+540+189+589+496=2016\) .
Comments