#include <iostream>
#include<algorithm>
using namespace std;
int m, n;
int a[100][100];
int main()
{
cin >> m >> n;
for (int i = 0; i < m; i++)
for (int j = 0; j < n; j++)
cin >> a[i][j];
int M = a[0][0], x = 0, y = 0;
for(int i = 0; i < m; i++)
for (int j = 0; j < n; j++)
{
if (a[i][j] > M)
{
M = a[i][j];
x = i; y = j;
}
}
cout << M << "," << x << "," << y << endl;
return 0;
}
7-22 二维数组找最值 (12point(s))
最新推荐文章于 2023-07-12 18:19:21 发布