摘要: 很早之前就做过的题以前用并查集做的现在用DFS重做算是熟悉DFS吧#include#includeconst int size=1000;int graph[size][size];int visit[size];int cout;int n,m;void get_graph(){ memset(graph,0,sizeof(graph)); memset(visit,0,sizeof(visit)); int t1,t2; for(int i=0;i<m;i++) { scanf("%d%d",&t1,&t2); graph[t1][t2]=1; g 阅读全文
posted @ 2014-01-27 11:36 ACalvin 阅读(182) 评论(0) 推荐(0) 编辑