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 wuyue19 at 2009-11-06 16:26:37 on Problem 1112
In Reply To:不是等价类哦,是问一个图怎样拆分成一个点数最接近的二部图。先求出所有连通分支再dp Posted by:dynamic at 2003-05-23 09:57:53
> 这题涉及到得算法都很基本,要揉合在一起用好不容易。
首先是求联通分量(可以bfs也可以用幷查集);
然后每个联通分量二分染色。(bfs中处理,中途判断无解情况);
然后dp,记录路径(记路径的时候很纠结啊。我用的字符串,求更好的方法);
数据很抑郁,有56组。
我中途考虑掉了很多情况但是觉得都算不上陷阱吧,还好。

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