What is wrong with my Prim's algorithm?

Revision en1, by KimJennie, 2022-06-25 22:38:14

Hello, Codeforces!

I have to find MST with this algorithm, but got WA. Can you please help me? I would really appreciate that.

https://pastebin.com/P4nGmhRM

Tags prim algorithm, mst

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English KimJennie 2022-06-26 01:05:04 15
en2 English KimJennie 2022-06-26 01:03:25 425
en1 English KimJennie 2022-06-25 22:38:14 201 Initial revision (published)