Advertisement
STANAANDREY

linii_egale

Apr 22nd, 2019 (edited)
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n,m,i,j,a[100][100],x,y,ok=1;
  6. cout<<"n=";cin>>n;
  7. cout<<"m=";cin>>m;
  8. for (i=0;i<n;i++)
  9. for (j=0;j<m;j++)
  10. cin>>a[i][j];
  11. cout<<"x=";cin>>x;
  12. cout<<"y=";cin>>y;
  13. for (i=0;i<m&&ok;i++)
  14. {
  15.     if (a[x][i]!=a[y][i])
  16.     ok=0;
  17. }
  18. if (ok)
  19.     cout<<"DA";
  20. else
  21.     cout<<"NU";
  22.   return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement