摘要: http://poj.org/problem?id=1321题意:汉语的,so good。和zoj1002差不多,递归,回溯代码:#include<iostream>#include<cstdio>#include<string>#include<cstring>using namespace std;int map[10][10];int n,k;int ans;bool judge(int x,int y){ for(int i=x-1;i>=0;i--) { if(map[i][y]==2)return 0; } for(int i= 阅读全文
posted @ 2012-02-25 02:15 快乐. 阅读(176) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4回溯,说起来简单,做起题来要多加纠结有多纠结。。。真是对搜索一窍不通,做的郁闷题意:对第一个字符串操作 不断入栈出栈 有几种方法可以得到第二个字符串题意纠结难懂,程序更是,看了别人的代码还是稀里糊涂的,搜索搜索,come on,please代码:#include<iostream>#include<cstdio>#include<cstring>#include<stack>using namespace std;int len 阅读全文
posted @ 2012-02-25 02:11 快乐. 阅读(175) 评论(0) 推荐(0) 编辑