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