Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a[22][22], n, m;
- void read() {
- cin >> m >> n;
- for (int i = 1; i <= m; i++) {
- for (int j = 1; j <= n; j++) {
- cin >> a[i][j];
- }
- }
- }
- bool arecompl(int col1, int col2) {
- for (int line = 1; line <= m; line++) {
- if (a[line][col1] == a[line][col2]) {
- return false;
- }
- }//*/
- return true;//*/
- }
- int main() {
- read();
- int ans = 0;
- for (int col = 2; col <= n; col++) {
- if (arecompl(1, col)) {
- ans++;
- }
- }
- cout << ans << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement