Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // 12
- #include <iostream>
- using namespace std;
- int main()
- {
- int n, mn, c = 0;
- cin >> n;
- int a[n][n];
- for(int i = 0; i < n; i++){
- for(int j = 0; j < n; j++){
- cin >> a[i][j];
- if(i == 0 && j == 0){ // если введен элемент a[0][0]
- mn = a[0][0];
- }
- if(a[i][j] < mn){
- mn = a[i][j];
- }
- }
- }
- for(int i = 0; i < n; i++){
- for(int j = 0; j < n; j++){
- if(a[i][j] == mn){
- if(i != j && j != (n - i - 1)){ // if()
- c++;
- cout << i << " " << j << endl;
- }
- }
- }
- }
- if(c == 0){
- cout << "NO";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment