#include <iostream> using namespace std; int main() { setlocale(LC_ALL, "Russian"); int N; cin >> N; int **arr = new int*[N]; for (int i = 0; i < N; i++) { arr[i] = new int[N]; for (int j = 0; j < N; j++) cin >> arr[i][j]; } int mem = 0; for (int i = 1; i < N; ++i) if (arr[mem][N - 1 - mem] > arr[i][N - 1 - i]) mem = i; cout << mem + 1 << " " << N - mem << endl; system("pause"); return 0; }
#include <iostream>
using namespace std;
int main() {
setlocale(LC_ALL, "Russian");
int N; cin >> N;
int **arr = new int*[N];
for (int i = 0; i < N; i++) {
arr[i] = new int[N];
for (int j = 0; j < N; j++)
cin >> arr[i][j];
}
int mem = 0;
for (int i = 1; i < N; ++i)
if (arr[mem][N - 1 - mem] > arr[i][N - 1 - i])
mem = i; cout << mem + 1 << " " << N - mem << endl;
system("pause");
return 0;
}