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 |
提供点思路如果去掉最后一个顶点可以和第一个顶点相连这个条件,那么该怎么解? O(P)的贪心就可以了。 因为答案必定是无环的,那么枚举断点,然后采用贪心,就可以得到O(np)的解法。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator