Each edge — 'i' in the graph has two values associated with it — v1[i] and v2[i].
Let M be one of the possible Spanning Tree of the graph. Then define A = max(v1[i]'s for all the edges in ST) and B = max(v2[i]'s for all the edges in the ST).
Then for all the possible Spanning Trees of this graph find the minimum value of A + B.
Is there a link where I can submit this problem?
iirc link cut tree should work. Check the comments of the editorial of 1386C - Joker for reference.
If the expected time complexity is O(VElog(V)+Elog(E))? Then is there any easier method possible?
Use two pointers to find, for each $$$A$$$, the minimum possible $$$B$$$. Now the problem becomes:
I don't find any "easy" way to answer queries of the third type in $$$O(V \log V)$$$ (a normal DFS works in $$$O(V+E)$$$). Link cut tree is much faster, but it looks overkill.