Getting wrong answer for this Problem ?

scc

#1

I am trying to solve this problems Problem.The problems is to check whether the given graph is a single strongly connected component or not.I used tarjan algorithm My code
shows the correct output for all test cases.But I am not able to get where the error is.Any help is appreciatable.