摘要: http://poj.org/problem?id=3687样例太唬人了,求得是从1到N重量 而不是排好序的标签逆向建图 把最重的赋给第一个入度为0的标签 如有多个赋给标签大的 这样能保证重量大的在后面View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<algorithm> 5 using namespace std; 6 int to[301],w[301][301],de[301],tt[301]; 7 int topo(int n 阅读全文
posted @ 2012-12-06 16:05 _雨 阅读(104) 评论(0) 推荐(0) 编辑