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

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

Hi coders!

Can anyone help me out, how to solve this problem on SPOJ? Any help/hint is appreciated.

Have nice day!

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

»
8 лет назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

https://en.wikipedia.org/wiki/Prim%27s_algorithm
I guess straightforward solution will work. Store also number of ways to reach certain vertex with minimal cost.

»
8 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

this problem sums up a hell lot of topics in graph theory and mathematics , misof wrote a solution to it on topcoder and I learnt from them (the problem and the solution) more than I learnt from any textbook or course