Qiuqiqiu  
不管道路多么崎岖坎坷,我永远不停下追逐梦想的脚步!

2012年4月30日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3231很巧妙地将问题转化为拓扑排序View Code 1 #include <cstdio> 2 #include <cstring> 3 using namespace std; 4 5 const int N=2010; 6 bool g[3][N][N]; 7 int ind[3][N],n; 8 int topo[3][N]; 9 int x[N],y[N],z[N];10 bool toposort(int k)11 {12 memset(ind[k],0,sizeof(in 阅读全文
posted @ 2012-04-30 14:35 Qiuqiqiu 阅读(506) 评论(0) 推荐(0) 编辑
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=3357View Code 1 //3357 2 #include <cstdio> 3 #include <cstring> 4 using namespace std; 5 6 const int N=250; 7 int g[N][N]; 8 int main() 9 {10 int n,m,C=0;11 while(scanf("%d%d",&n,&m),n||m)12 {13 memset(g,0,sizeof(g));14 for(int 阅读全文
posted @ 2012-04-30 10:48 Qiuqiqiu 阅读(170) 评论(0) 推荐(0) 编辑