~/algor $ cat problems/matritsa-ustun-minimumlari
Minimum of each column
Easy
1000 ms
128 MB
26%
An integer matrix of size $n \times m$ is given. Find and print the smallest element of every column.
Input
The first line contains two positive integers $n$ and $m$. Each of the next $n$ lines contains $m$ integers.
Output
One line with $m$ space-separated integers — the minimum of each column.
Note
$1 \le n, m \le 200$
$-1000 \le a_{i,j} \le 1000$
Examples
Input #1
2 3 1 -2 3 -4 5 6
Output #1
-4 -2 3
Input #2
1 3 4 -4 0
Output #2
4 -4 0