SHARE
TWEET

Untitled

a guest May 19th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.      int N;
  5.   cin>>N;
  6. int c=0;
  7.     int **arr = new int*[N];//объявление массива
  8.  
  9.     for (int count = 0; count < N; count++)//выделение памяти под массив
  10.         arr[count] = new int[N];
  11.  
  12.  
  13.  for (int row = 0; row < N; row++){//заполнение массива
  14.             for (int column = 0; column <N; column++)
  15.             cin>>arr[row][column];
  16.  }
  17.  for (int row = 0; row < N; row++){//заполнение массива
  18.             for (int column = 0; column <N; column++){
  19.            if(arr[column][row]==arr[row][column]){
  20.                c++;
  21.            }
  22.  }
  23.  }
  24.  if(c==N*N){
  25.      cout<<"yes";
  26.  }
  27.  else{
  28.      cout<<"no";
  29.  }
  30.     return 0;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top