#include #include #include using namespace std; struct member { int index; int lowlink; int scc; bool instack; vector adjacent; member() { index = -1; lowlink = -1; instack = false; } }; vector members; stack s; int no_of_scc_zero_indegree = 0; int scc_zero_indegree; int index = 1; int last; int no_of_scc = 0; int count = 0; int candidate; void tarjan(int act, int &index) { members[act].lowlink = index; members[act].index = index; members[act].instack = true; index++; s.push(act); for(int i=0; i scc(no_of_scc+1,false); for(int i=1; i<=vertices; i++) { for(int j=0; j