1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<iostream>
#include<vector>
using namespace std;
int main()
{
    short n,m,k;
    cin>>n>>m>>k;
    vector<int> grade(n);
    vector<vector<int>> graf(n,vector<int>());
    if(n == k)
    {
        cout<<0<<endl;
    }
    else
    {
        for(int i = 0; i < m; i++)
        {
            int a,b;
            cin>>a>>b;
            graf[a].push_back(b);
            grade[a]++;
        }
    }
}