evcamels

timp_1-18

Dec 23rd, 2021
855
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4. using namespace std;
  5. int main(){
  6.     int a[100][100];
  7.     int n;
  8.     cin >> n;
  9.    
  10.     for(int i=0;i<n;i++){
  11.         for(int j=0;j<n;j++){
  12.             cin >> a[i][j];
  13.         }
  14.     }
  15.     for(int i=0;i<n;i++){
  16.             int b = 1;
  17.         for(int j=0;j<n;j++){
  18.             if(a[i][j] == a[b][j]){
  19.                 continue;
  20.             }else cout << a[i][j] << " ";
  21.         }
  22.         cout << endl;
  23.     }
  24.     return 0;
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment