Hello CF, I have been recently trying to solve [427C](http://mirror.codeforces.com/problemset/problem/427/C). As per the editorial I have found all the strong connected components and then have found the minimum cost for each SCC component. Also I have found the number of junctions having the minimum value. But I am getting wrong answer for test case 71. My solution is [here](http://mirror.codeforces.com/contest/427/submission/36300357). I can't figure out my mistake can anybody help?↵
<br>↵
<br>↵
Let me jot down which function is doing what in my code<br>↵
1) dfs_visit : Used for applying dfs on the graph provided and obtain the sequence of nodes according to their ending time which is stored in stack named seq.<br>↵
2) scc_comp : Used to get the different SCCs for the reverse graph t_v which will be stored in scc.<br>↵
<br>↵
<br>↵
The second issue is why are these two submissions giving different answers on Test case 71 [Solution1](http://mirror.codeforces.com/contest/427/submission/36300357) and [Solution2](http://mirror.codeforces.com/contest/427/submission/36295240http://mirror.codeforces.com/contest/427/submission/36295240).)↵
Any optimization suggestions are also welcomed.<br>↵
Thanks:)
<br>↵
<br>↵
Let me jot down which function is doing what in my code<br>↵
1) dfs_visit : Used for applying dfs on the graph provided and obtain the sequence of nodes according to their ending time which is stored in stack named seq.<br>↵
2) scc_comp : Used to get the different SCCs for the reverse graph t_v which will be stored in scc.<br>↵
<br>↵
<br>↵
The second issue is why are these two submissions giving different answers on Test case 71 [Solution1](http://mirror.codeforces.com/contest/427/submission/36300357) and [Solution2](http://mirror.codeforces.com/contest/427/submission/36295240
Any optimization suggestions are also welcomed.<br>↵
Thanks:)