摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1285看到的一个比较好的模板#include <iostream>using namespace std;#define MAX 505int map[MAX][MAX];int p[MAX];int toposort(int n,int mat[][MAX],int* ret){ //浙大模板,未改一点 int d[MAX],i,j,k; for (i=0;i<n;i++) for (d[i]=j=0;j<n;d[i]+=mat[j++][i]); for (k=0;k... 阅读全文
posted @ 2011-09-08 19:38 ○o尐懶錨o 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<string.h> typedef struct AOE { int n; //所指为该节点的值 struct AOE *next; }AOE; // 一个动态链表用来记录后面的连接表struct T { int n,flag; //该节点前面有多少个元素 AOE *next; }VEX[524]; //静态链表用来储存头结点 void build( int x, int y) //建立表 { AOE... 阅读全文
posted @ 2011-09-08 19:27 ○o尐懶錨o 阅读(161) 评论(0) 推荐(0) 编辑