#K71357. Fastest Checkpoint Times
Fastest Checkpoint Times
Fastest Checkpoint Times
You are given a series of test cases. In each test case, there are $N$ friends and $M$ checkpoints. Each friend records the time it took to reach each checkpoint. Your task is to determine the fastest (minimum) time at which each checkpoint was reached among all friends.
The input format begins with an integer indicating the number of test cases. For each test case, the first line contains two integers, $N$ and $M$. This is followed by $N$ lines, each containing $M$ integers that represent the time taken by a friend to pass through the checkpoints.
The output should list the fastest time for each checkpoint, in order, for every test case, with each test case's answer printed on a new line.
Example:
Input: 1 3 4 5 6 7 8 3 4 5 6 8 7 6 5</p>Output: 3 4 5 5
inputFormat
The first line of input contains an integer , the number of test cases. For each test case, the first line contains two integers and separated by a space. Then follow lines, each containing integers representing the time each friend took to reach each checkpoint.
outputFormat
For every test case, output a single line containing space-separated integers where each integer is the fastest time that checkpoint was reached.## sample
1
3 4
5 6 7 8
3 4 5 6
8 7 6 5
3 4 5 5
</p>