摘要: http://poj.org/problem?id=2676一列一列的放 判断是否符合条件View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<stdlib.h> 5 using namespace std; 6 char s[20][20]; 7 int vx[20][20],vy[20][20],vis[20][20]; 8 int judge(int x,int y) 9 { 10 if(x>=0&&x< 阅读全文
posted @ 2013-01-27 20:28 _雨 阅读(186) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1129四色定理 最多有四色 从1到四搜View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<stdlib.h> 5 using namespace std; 6 int n,w[100][100],co[100],mi,flag; 7 void dfs(int x,int v) 8 { 9 int i,j,f,k=v;10 if(flag)11 return ;12 if(x>n 阅读全文
posted @ 2013-01-27 19:44 _雨 阅读(137) 评论(0) 推荐(0) 编辑