Блог пользователя themechanicalcoder

Автор themechanicalcoder, история, 6 лет назад, По-английски

I was solving the problem Uva 10600 in which we have to find the minimum and second minimum spanning tree I found the minimum spanning tree using kruskal's algorithm and stored the edges in a vector mst then to find the second minimum spanning tree I did this

second_tot_wt=INF for edge in mst : second_tot_wt=min(second_tot_wt,total weight of the minimum spanning tree ignoring this edge)

my code was fine on the test case but I am getting the verdict wrong answer can someone please help

my solution

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

Автор themechanicalcoder, история, 6 лет назад, По-английски

Hey guys I have found a very good youtube playlist to learn C++ STL hope you find it helpful here is the link https://www.youtube.com/playlist?list=PL5jc9xFGsL8G3y3ywuFSvOuNm3GjBwdkb

Полный текст и комментарии »

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится