Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

codeforces 500B help needed

$
0
0

link to

WRONG

solution
I used priority queue to keep shortest at top of the graph and print them according to group number, as group number will be the smallest element in the individual graph, and initially each pq contains one element i.e. itself, and group number as itself, if a link with some other vertex is found with smaller group number, its all elements are transferred to that pq, and in case of duplicate , all of them are removed/ as it failed at test case 8 and 22nd th element is different , and other aren't visible to me and even if were, making a matrices on copy and solving by pen would be tough , can you please help me figure out whats wrong. Thanks in advance :)CODEFORCES 500B LINK


Viewing all articles
Browse latest Browse all 39796

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>