Need a Help in this graph problem

Revision en1, by Apophis404, 2025-09-13 11:14:45

I am having some difficulty in solving the following problem :

https://codeforces.me/gym/105789/problem/D

I tried reading the editorial and understood the MST part of it. But I cant understand the next Virtual Node/ LCA part. I thought the problem is quite interesting and important, thats why hoping would get some help from here.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Apophis404 2025-09-13 11:14:45 374 Initial revision (published)