#K8011. Maximum Possible Value of Array's Greatest Element
Maximum Possible Value of Array's Greatest Element
Maximum Possible Value of Array's Greatest Element
Given an array of integers, you are allowed to perform any number of operations on it. Although the problem statement does not specify the exact operations, it has been proven that the maximum possible value achievable for the greatest element of the array is simply the minimum element of the initial array. In other words, if the array is \(a_1, a_2, \ldots, a_n\), then:
\(\max_{\text{operations}}(\max(a)) = \min(a_1, a_2, \ldots, a_n)\)
If the array is empty, then the answer is defined as 0.
inputFormat
The input begins with an integer \(T\) denoting the number of test cases. Each test case consists of two lines. The first line contains an integer \(M\) representing the number of elements in the array. The second line contains \(M\) space-separated integers denoting the array elements.
outputFormat
For each test case, output a single integer denoting the maximum possible value of the greatest element in the array after performing any number of operations. Each result should be printed on a new line.
## sample4
4
10 20 30 40
3
5 10 15
2
1 2
5
50 20 30 40 10
10
5
1
10
</p>