#include using namespace std; int nodeCount,edgeCount; bool vis[1000]; void dfs(int src,vectorG[1000]) { vis[src]=true; cout<>nodeCount>>edgeCount; memset(vis,false,sizeof(vis)); vector G[1005]; for(int i=1;i<=edgeCount;i++) { int a,b; cin>>a>>b; G[a].push_back(b); } dfs(2,G); }