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 |
重边算一条如果是用判父节点的方式就可以不用考虑重边。 如果是用判边的方式则需要考虑重边。 这里推荐前者。用fa[u]记录u的父节点,每次都判断一下fa[u] == v ?就ok了。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator