摘要: 题目:uva 11324The Largest Clique从图中某点出发,求最远能够一次走过多少个节点分析:tarjan求gcc,然后构造出新图,新图是一个dag,对于dag上用dp求出最长路径即可。dp转移方程为dp[x] = size[x] + max(dp[y]); 缩点后有边x到y的边,记忆化搜索就行了,具体看实现代码#include <iostream>#include <cstring>#include <cstdio>#include <vector>using namespace std;const int maxn = 100 阅读全文
posted @ 2012-11-05 18:09 yejinru 阅读(360) 评论(0) 推荐(0) 编辑