Help me on "SPOJ — CAPCITY" [ TLE ]

Правка en1, от codexaxor, 2019-06-27 20:48:47

In this problem I have applied normal DFS technique. But when I got TLE for the first time then I shift all i/o to scanf/printf thought it would be helpful. Then I googled for this problem and there used SCC(strongly connected components) technique. Now I want to know why 2-DFS technique is faster from 1-DFS technique here. Would someone explain this for me. my solution in c++ solution problem link problem on SPOJ

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский codexaxor 2019-06-27 20:48:47 525 Initial revision (published)