Rows with minimal elements
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Two dimensional array of size n * m is given. Find the rows that contain the minimal element.
Input
First line contains two numbers n and m (1 ≤ n, m ≤ 100) - the number of rows and the number of columns. Next given n rows with m integers - the array elements. All numbers do not exceed 100 by absolute value. The numbering of elements starts with 1.
Output
In one line print the numbers of rows that contain minimal element in increasing order.
Examples
Input #1
Answer #1
Input #3
Answer #3
Submissions 7K
Acceptance rate 49%