
acm拓扑排序
文章平均质量分 73
JustSteps
这个作者很懒,什么都没留下…
展开
-
hdu 1285拓扑排序
#include #include #include #include using namespace std;int map[505][505];int indegree[505];int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { int i,a,b; memset原创 2013-01-24 16:04:27 · 982 阅读 · 0 评论 -
hdu 2647
http://acm.hdu.edu.cn/showproblem.php?pid=2647#include #include #include #include #define MM 10005using namespace std;int inde[MM];int add[MM]; //每人要加的。struct Node{ int data; Nod原创 2013-01-24 23:19:11 · 2312 阅读 · 0 评论 -
hdu 1811 拓扑排序,查并集
先鄙视一下自己哎~~忘初始化一个数组结果一直wa对照别人代码找了好久~~~这是一道很好的题,考验自己的基本功~~先是用邻接矩阵结果内存超出~~~~写邻接表花了好一阵~~~一下代码:#include #include #include using namespace std;int parent[10005];int l[20005],r[20005];char c[2000原创 2013-01-24 21:47:03 · 1206 阅读 · 0 评论 -
hdu 3342
#include #include #include #include using namespace std;int map[505][505];int indegree[505];int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { if(n==0&&m==0)原创 2013-01-24 16:05:22 · 1117 阅读 · 0 评论