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 |
题目就是求出度为0的强连通分量,题目没错,请仔细审题……主要是这句: A node v in a graph G=(V,E) is called a sink, if for every node w in G that is reachable from v, v is also reachable from w. 题目没错,不要听前面discuss里的一些说法。 哥一次AC了。 两次dfs求强连通分量,vector<int>adj[5001]做邻接表。 这种强连通分量可有多个,从小到大把节点输出就可以了 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator