摘要: 题意:给出一个数 n,代表有n个点,编号为1-n,接下来n行,每行若干个数字,读到0结束,以行号为起点,输入的数字为终点建一条有向边,求一种可能的拓扑排序。View Code #include<stdio.h>#include<stack>#include<string.h>using namespace std;const int MAXN = 100 + 10;struct node{ int to; struct node *next;};int nE;node Edge[MAXN * 2];node *head[MAXN];int count[MAX 阅读全文
posted @ 2012-07-26 12:45 小猴子、 阅读(263) 评论(0) 推荐(0) 编辑