Max Flow

View as PDF

Submit solution

Points: 3
Time limit: 2.5s
Memory limit: 64M

Author:
Problem type
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 T (1 \le T \le 10) scenarios. In each scenario, there are N (1 \le N \le 10) flows, and the value of the i-th flow is F_{i} (1 \le F_{i} \le 100) - your job is to find the largest of the flow values.

Input Specification

Line 1: 1 integer, T
For each scenario:
Line 1: 1 integer, N
Next N lines: 1 integer, F_{i}, for i = 1\ldots N

Output Specification

For each scenario:
Line 1: The largest flow value.

Sample Input

2
4
2
5
3
5
1
1

Sample Output

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

There are no comments at the moment.