Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int n,i,j,a[100][100],k,m,nr,ok,c;
- cout<<"n=";cin>>n;
- cout<<"m=";cin>>m;
- for (i=0;i<n;i++)
- for (j=0;j<m;j++)
- cin>>a[i][j];
- cout<<endl;
- for (c=0;c<n-1;c++) {
- for (i=c+1;i<n;i++) {
- ok=1;
- for (j=0;j<m&&ok;j++)
- {
- if (a[i][j]+a[c][j]!=1)
- ok=0;
- }
- if (ok)
- cout<<c<<' '<<i<<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement