//In the name of 2002! #include #include #include #include using namespace std; const int MAX=1e6; #define endl "\n" vector list[MAX]; vector vertex; int no_come[MAX]; deque s; vector ans; set vs; void topol(int e){ int count=0; for(int i=0;i>e; cout<<"Please enter the input and output vertices"<>v1>>v2; if(vs.find(v1)==vs.end()){ vs.insert(v1); vertex.push_back(v1); } if(vs.find(v2)==vs.end()){ vs.insert(v2); vertex.push_back(v2); } list[v1].push_back(v2); no_come[v2]++; } topol(e); } int main(){ input(); return 0; }