摘要: 只是一道Nim题我们可以把他转化成堆就可以了,这个点在哪个地方就相当于这个地点有好多的石子,这样就可以了。View Code 1 #include<iostream> 2 #include<cstdio> 3 #include<cstdlib> 4 #include<algorithm> 5 #include<cmath> 6 #include<queue> 7 #include<set> 8 #include<map> 9 #include<vector>10 using namesp 阅读全文
posted @ 2012-04-19 22:25 wutaoKeen 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 这个题我是打表出来的,达标代码如下:View Code 1 #include<iostream> 2 #include<cstdio> 3 #include<cstdlib> 4 #include<algorithm> 5 #include<cmath> 6 #include<queue> 7 #include<set> 8 #include<map> 9 #include<vector>10 using namespace std;11 int d[3][2] = {0,-1,1,0, 阅读全文
posted @ 2012-04-19 22:04 wutaoKeen 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 这题我刚开始推出了n=1,2,3的情况,自己在大胆的猜测是奇偶性,发现A了;后来打表也是奇偶性质;打表代码:View Code 1 #include<stdio.h> 2 #include<stdlib.h> 3 int n ; 4 int graph[1010][1010] ; 5 int tab[4][2] = {-1,0,1,0,0,-1,0,1} ; 6 int dfs (int x, int y) 7 { 8 int xx, yy, i, ans ; 9 for (i = 0 ; i < 4 ; i++) 10 { ... 阅读全文
posted @ 2012-04-19 20:40 wutaoKeen 阅读(208) 评论(0) 推荐(0) 编辑