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,grade[100];
- void citire()
- {
- cin>>n>>m;
- for(i=1; i<=m; i++)
- {
- fin>>x>>y;
- A[x][y]=1;
- }
- }
- int grad_intern(int x)
- {
- int i,gradin=0;
- for(i=1; i<=1; i++)
- gradin=gradin+A[i][x];
- return gradin;
- }
- int main()
- {
- int i;
- citire();
- for(i=1; i<=n; i++)
- if(grad_intern(i)==0)
- {
- cout<<i<<' ';
- ok=1;
- }
- if(ok==0)
- cout<<"NU EXISTA";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement