University of Toronto ACM-ICPC Tryouts 2012

A: Max Flow

Many computer scientists have nightmares about the daunting task of finding the max flow. Can you handle it?

There are T (1 ≤ T ≤ 10) scenarios. In each scenario, there are N (1 ≤ N ≤ 10) flows, and the value of the i-th flow is Fi (1 ≤ Fi ≤ 100) - your job is to find the largest of the flow values.

Input

Line 1: 1 integer, T
For each scenario:
Line 1: 1 integer, N
Next N lines: 1 integer, Fi, for i = 1..N

Output

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.

All Submissions
Best Solutions


Point Value: 3
Time Limit: 5.00s
Memory Limit: 64M
Added: Oct 02, 2012
Author: SourSpinach

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

does max flow mean the largest number?

Read the question:
your job is to find the largest of the flow values.


Line 1: The largest flow value.