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 |
请教该算法的正确性(我好像可以证明,但一直WA),感激不尽先找出连通块,对每一个连通块,如果该连通块含奇回路,那么该连通块的所有点都可行。 这样找奇回路:从任一点开始进行标号,如果某节点被标为1,则与之相邻的将被标为2。反之亦然。如果有点既被标为1,又被标为2,那么,该连通块含奇回路。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator