#K61687. Minimum of Maximum Delivery Times
Minimum of Maximum Delivery Times
Minimum of Maximum Delivery Times
You are given several orders, where each order contains multiple shipments. For each order, the delivery times of each shipment are provided.
Your task is to compute the maximum delivery time for each order and then output the minimum among these maximum values.
More formally, if for the i-th order the shipment delivery times are \(a_{i,1}, a_{i,2}, \dots, a_{i,N_i}\), then let \(M_i = \max\{a_{i,1}, a_{i,2}, \dots, a_{i,N_i}\}\). You are to find and output \(\min_{1 \le i \le T} M_i\).
inputFormat
The input is read from standard input (stdin) and has the following format:
- The first line contains a single integer \(T\), representing the number of orders.
- Each of the next \(T\) lines describes an order. For each order, the line begins with an integer \(N\) (the number of shipments in the order) followed by \(N\) space-separated integers indicating the delivery times of each shipment.
You can assume that the input is valid. If there is any mismatch between the number of shipments and the provided delivery times, an error may occur.
outputFormat
Output a single integer to standard output (stdout) which is the minimum among the maximum delivery times computed for each order.
## sample3
5 3 1 6 8 2
4 5 10 2 7
3 4 3 9
8