Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

雁过留声——最大生成树

Posted by fanhqme at 2009-07-15 10:58:06 on Problem 3723
一开始往最小割上想了。
一看数据,又往线段树+贪心上想了。

蓦然回首,才发现,题目让从N+M各点间找出权和最大的若干个边,
使得这些边不形成环。

又想去贪心了,突然,这不是最大生成树吗?

由于可能最终结果是森林,所以Kruskal发威吧!

题目竟然只是研究异性间的互相作用...还是改成普通的友情比较健康吧。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator