Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
449 B
1
Indexable
Never
#include <iostream>
using namespace std;
int main()
{
	int n;
	int m;
	cin >> n >> m;
	int mas[50][50];
	for (int i = 0; i < n; i++) {
		for (int w = 0; w < m; w++) {
			cin >> mas[i][w];
		}
	}
	int max = mas[0][0];
	int a = 0;
	int b = 0;
	for (int i = 0; i < n; i++) {
		for (int w = 0; w < n; w++) {
			if (max < mas[i][w]){
				max = mas[i][w];
				a = i;
				b = w;
			}
		}
	}
	cout << a << " " << b;
	return 0;
}
Leave a Comment