13

Minimum Spanning Tree under 2 constraints instead of just 1

 3 years ago
source link: http://codeforces.com/blog/entry/101772
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Each edge — 'i' in the graph has two values associated with it — v1[i] and v2[i].
Let M be one of the possible MST of the graph. Then define A = max(v1[i]'s for all the edges in MST) and B = max(v2[i]'s for all the edges in the MST).

Then for all the possible MSTs of this graph find the minimum value of A + B.


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK