poj 2553 The Bottom of a Graph
摘要:
http://poj.org/problem?id=2553题意:给一个无向图,如果一个点v能够到达w并且w也能到v则w和v都称为一个sink,题目要求从大到小输出图中所有的sink点。注意叶子结点都是sink点。思路:正如上面说的叶子结点都是sink,而且只有叶子结点才能形成sink点。因而先进行缩点,然后再求叶子结点。View Code #include<set>#include<map>#include<stack>#include<queue>#include<cmath>#include<bitset>#incl 阅读全文
posted @ 2012-07-03 21:51 aigoruan 阅读(114) 评论(0) 推荐(0)