University of Toronto ACM-ICPC Tryouts 2012
Many computer scientists have nightmares about the daunting task of finding the max flow. Can you handle it?
There are
Input Specification
Line 1: 1 integer,
For each scenario:
Line 1: 1 integer,
Next
Output Specification
For each scenario:
Line 1: The largest flow value.
Sample Input
Copy
2
4
2
5
3
5
1
1
Sample Output
Copy
5
1
Explanation of Sample
In the first scenario, the 4 flows have values of 2, 5, 3, and 5, respectively. The largest of these values is 5.
In the second scenario, the only flow has a value of 1, so the max flow is 1.
Comments