2013年9月1日

HDU 1045 Fire Net

摘要: Fire NetTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5076Accepted Submission(s): 2847 Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a 阅读全文

posted @ 2013-09-01 23:39 天使是一个善良的神 阅读(163) 评论(0) 推荐(0) 编辑

无前驱的顶点的拓扑排序

摘要: 无前驱的顶点的拓扑排序算法,采用链式前向星存储图,队列实现拓扑排序代码:#include #include #include using namespace std;int i,j,w;int head[100];int indegree[100];struct EdgeNode{ int to; int next;};EdgeNode Edge[1000];int n,m;int main(){ while(~scanf("%d%d",&n,&m)) { memset(indegree,0,sizeof(indegree)); memset(head,0, 阅读全文

posted @ 2013-09-01 20:36 天使是一个善良的神 阅读(372) 评论(0) 推荐(0) 编辑

导航