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