摘要: 想多了!以为一直dfs所有的情况会超时,所以直接忽略了,就自己想了一个优化的算法,最后测试结果对了,但是wa了,自己写算法很容易考虑不周的,还是在最后没有办法的时候在考虑自己的算法吧!!!简单的dfs就可以了!#include#include#define Max 100char goal_str[Max];char source_str[Max];char stack[Max];int path[Max];int lenth,top,pointer;void print_path(void){ int i; for(i=0;i0&&stack[top-1]==goal_str 阅读全文
posted @ 2014-03-31 21:59 keyboard3 阅读(169) 评论(0) 推荐(0) 编辑