【BZOJ 2521】[SHOI2010] 最小生成树

相关链接

题目传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=2521
神犇题解:http://krydom.com/bzoj2521/

解题报告

这题有一个非常显然的贪心:做Kruskal的时候,如果会使那条边的两个端点连在一起就暴力加权值
但这样显然也是错误的,因为我们可能是在之前的步骤就废掉一些边
于是怎么解决这个问题呢?
我们相当于不能在某两个端点之间有通路,那么这和网络流的增广路相同
于是我们把边的容量设为暴力改的时候需要的花费,然后跑一遍最小割就可以了

16 thoughts to “【BZOJ 2521】[SHOI2010] 最小生成树”

  1. It’s really a great and helpful piece of info. I’m satisfied that you just shared this helpful information with us. Please stay us informed like this. Thank you for sharing.

  2. hey there and thanks for your information – I have certainly picked up anything new from right here. I did however expertise a few technical points the usage of this site, as I skilled to reload the web site lots of occasions prior to I may get it to load correctly. I were puzzling over in case your web hosting is OK? No longer that I’m complaining, however slow loading instances times will very frequently affect your placement in google and could injury your high-quality ranking if ads and ***********|advertising|advertising|advertising and *********** with Adwords. Anyway I am including this RSS to my email and could glance out for much extra of your respective intriguing content. Ensure that you replace this again very soon..

  3. 728956 364703Greetings! This is my 1st comment here so I just wanted to give a quick shout out and say I truly enjoy reading your posts. Can you recommend any other blogs/websites/forums that cover the same subjects? Thanks for your time! 182875

  4. 750962 676342Howdy! Do you know if they make any plugins to safeguard against hackers? Im kinda paranoid about losing everything Ive worked hard on. Any suggestions? 294696

  5. 223231 468263A person essentially support to make seriously articles I would state. This is the first time I frequented your internet site page and thus far? I surprised with the research you made to make this certain publish incredible. Wonderful job! 336552

  6. 49439 887360What a exceptional viewpoint, nonetheless is just not produce every sence by any indicates discussing this mather. Just about any technique thanks and also i had try and discuss your post directly into delicius but it surely appears to be an problem inside your blogging is it possible you need to recheck this. thank you just as before. 721094

Leave a Reply

Your email address will not be published. Required fields are marked *