Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int main(){
- int n;
- cin >> n;
- int a[500][500];
- for (int i = 0 ; i < n ; i++){
- for(int j = 0 ; j < n ; j++){
- cin>>a[i][j];
- }
- }
- int min = 1001;
- int i_rez, j_rez;
- for (int i = 0 ; i < n ; i++){
- for(int j = 0 ; j < n ; j++){
- if (i+j == n-1){
- if (a[i][j] < min){
- min = a[i][j];
- i_rez = i+1;
- j_rez = j+1;
- }
- }
- }
- }
- cout << i_rez << " " << j_rez;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement