poj
zhang_li_yang
这个作者很懒,什么都没留下…
展开
-
poj1111-搜索
#include #include char maze[25][25]; int map[25][25]; int visit[25][25]; int movex[8]={0,0,1,-1,1,1,-1,-1}; int movey[8]={1,-1,0,0,1,-1,1,-1}; int m,n,s,t,l; void dfs(int a,int b) {//深度搜索 int x,y,i;原创 2013-05-04 09:17:51 · 616 阅读 · 0 评论 -
poj2488-搜索
判断给定的棋盘,马是否能遍历完所有的点,能遍历完就打印路径,否则输出不可能! 代码: #include #include int movex[8]={-2,-2,-1,-1,1,1,2,2}; int movey[8]={-1,1,-2,2,-2,2,-1,1};//这个顺序不能变 int flag;//是否可能的标志量 int a,b;//给定棋盘大小 int pathx[26],path原创 2013-05-04 21:21:44 · 693 阅读 · 0 评论 -
poj1328
题目大意:给定几个点,求用几个雷达能覆盖全部的点,输入的点为坐标,雷达的半径首先给定! 贪心求解: #include #include double x[1005],y[1005]; double left[1005],right[1005]; double r; int n,flag,test; int main() { test=1; while(scanf("%d%lf",&n,&r原创 2013-08-06 08:56:24 · 643 阅读 · 0 评论 -
poj3295-Tautology
/*大致题意: 输入由p、q、r、s、t、K、A、N、C、E共10个字母组成的逻辑表达式, 其中p、q、r、s、t的值为1(true)或0(false),即逻辑变量; K、A、N、C、E为逻辑运算符, K --> and: x && y A --> or: x || y N --> not : !x C --> implies : (!x)||y E --> equals原创 2013-07-22 22:59:40 · 660 阅读 · 0 评论