Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
比赛的时候,DFS+贪心过的In Reply To:我听说有人用的DFS+贪心,但我用得差不多却没过 Posted by:fusion at 2007-08-14 14:51:43 每次dfs遍历没有被邀请的节点,到所有最外层的可选节点, 然后标记他和他的父亲节点为不可取,再标记自己被邀请; 直到没有可以选择的节点为止。 至于yes和no,只要存在被邀请的点可以上下移动就是No 现在感觉这个方法很累~ Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator