hdu 3779
摘要:
简单记忆化搜索View Code #include<stdio.h>#include<string.h>int as[1005],bs[1005],cs[2005],ok,n,m;char hash[1005][1005];void dfs(int x,int y,int z){ if(hash[x][y]||ok)return; if(z==n+m)ok = 1; hash[x][y] = 1; if(as[x]==cs[z]&&x<n)dfs(x+1,y,z+1); if(ok)return; if(bs[y]==cs[z]&& 阅读全文
posted @ 2012-04-27 16:19 aigoruan 阅读(141) 评论(0) 推荐(0)