-->
当前位置:首页 > 题库

PROGRAMMING:Find the saddle point

Luz5年前 (2021-05-10)题库492
The "saddle point" of a matrix element refers to the maximum value of the element in the row and the minimum value in the column.
This problem requires programming to find the saddle point of a given $$n $$order matrix.
###Input format:
Enter the first line to give a positive integer $$n $$($$1 / Le n / Le 6 $$). This is followed by $$n $$rows, each giving $$n $$integers separated by spaces.
###Output format:
Output the position of the saddle point in a row in the format of "row subscript column subscript" (subscript starts from 0). If the saddle point does not exist, "None" is output. The problem guarantees that the given matrix has at most one saddle point.
###Input sample 1:
```in
four
1 7 4 1
4 8 3 6
1 6 1 2
0 7 8 9
```
###Output sample 1:
```out
2 1
```
###Input example 2:
```
two
1 7
4 1
```
###Output example 2:
```
NONE
```






answer:If there is no answer, please comment