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

2012年1月1日

摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1848组合博弈 sg值我的代码 1 #include <stdio.h> 2 #include <string.h> 3 int main() 4 { 5 const int N=1001,M=17; 6 const char name[2][10]={"Nacci","Fibo"}; 7 int f[M]={1,1}; 8 for (int i=2;i<M;i++) f[i]=f[i-1]+f[i-2]; 9 int a[N]={0},v 阅读全文
posted @ 2012-01-01 23:02 Qiuqiqiu 阅读(300) 评论(0) 推荐(0)
 
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1829并查集相同性别的为同一集合,异性的异性为同性我的代码 1 #include <stdio.h> 2 #include <string.h> 3 const int N=2010; 4 int set[N],dsex[N]; 5 int find(int x) 6 { 7 return set[x]==x?x:set[x]=find(set[x]); 8 } 9 int main()10 {11 int T,C=0;12 int n,m,x,y,fx,fy,ans,i;13 ... 阅读全文
posted @ 2012-01-01 18:50 Qiuqiqiu 阅读(220) 评论(0) 推荐(0)