SPOJ-CAPCITY Wrong Answer on Last Test Case

dfs
graph
scc
spoj

#1

Problem Link–>> http://www.spoj.com/problems/CAPCITY/

Classical Graph Problem.

Solution Link :–>> http://ideone.com/cvwbPT.

I would suggest to take a look.