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 |
我贪心0ms过。构造有向图,每次选入度最小的一个G作为下一个目标,即可。取最多G不对,有反例。In Reply To:可否这样贪? Posted by:gzw_02 at 2008-07-19 18:39:08 若能从a到b,则存在a到b的有向边,由此转化成图。 每次选下一个目标时,选可以到达且入度最小的结点。其实就是当有入度为1的点时把它选出来。因为入度不为1的话,这次不选下次还有其他点能到达。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator