【基础】马鞍数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
求一个n×m数阵中的马鞍数,输出它的位置。所谓马鞍数,是指在行上最小而在列上最大的数。 如下: n=5 m=5 5 6 7 8 9 4 5 6 7 8 3 4 5 2 1 2 3 4 9 0 1 2 5 4 8 则1行1列上的数就是马鞍数。
Input Format
共n+1行,第一行: n m (n,m<10) 第2到n+1行:每行m个整数
Output Format
输出若干行:如果存在马鞍数,则输出所有马鞍数,每行一个,为行和列以及马鞍数,马鞍数按照读入的顺序输出,也就是说,如果有多组马鞍数,先读入的先输出。 如果不存在马鞍数,则输出'not exist'。
9 8
9 8 7 6 5 4 3 2
8 8 9 9 9 9 9 9
3 7 7 6 5 4 2 1
8 8 3 2 1 7 3 2
7 5 3 2 9 1 3 2
6 3 2 1 9 3 1 3
8 2 1 3 5 8 9 1
1 3 2 1 3 5 6 8
9 3 1 2 3 4 5 8
2 2 8
Source
二维数组
数组及应用3(二维数组)
- Status
- Done
- Problem
- 5
- Open Since
- 2025-12-12 0:00
- Deadline
- 2025-12-19 23:59
- Extension
- 24 hour(s)