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