Is it possible to solve Xor-MST using prim's algorithm?

Правка en3, от hamidreza.hanify, 2017-11-24 14:45:47

Hello codeforces,

I'v recently been struggling with this problem Xor-MST.In it's tutorial it says u should use Boruvka's algorithm. For sake of learning i'v been trying to solve it using prim's algorithm but it runs out of time. I was wondering if it's some inefficiency in my coding or it's the algorithm which can't solve the problem in given time? here is my last code submitted: MY CODE

thanks in advance.

Теги prim algorithm, efficiency, mst, xor


  Rev. Язык Кто Когда Δ Комментарий
en3 Английский hamidreza.hanify 2017-11-24 14:45:47 25
en2 Английский hamidreza.hanify 2017-11-24 13:45:43 4 Tiny change: 'eforces,\nI'v rece' -> 'eforces,\n\nI'v rece'
en1 Английский hamidreza.hanify 2017-11-24 13:43:45 549 Initial revision (published)