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

比赛的时候,DFS+贪心过的

Posted by alpc62 at 2007-08-14 19:17:42 on Problem 3342
In Reply To:我听说有人用的DFS+贪心,但我用得差不多却没过 Posted by:fusion at 2007-08-14 14:51:43
每次dfs遍历没有被邀请的节点,到所有最外层的可选节点,
然后标记他和他的父亲节点为不可取,再标记自己被邀请;
直到没有可以选择的节点为止。

至于yes和no,只要存在被邀请的点可以上下移动就是No

现在感觉这个方法很累~

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