摘要: 题目信息:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=802 利用回溯法求解,但是一直超时。看了CSDN寂静山林用动态规划求解,速度很快。下面是超时的回溯法代码:////2012/2/28////#include<iostream>#include<algorithm>using namespace std;#define MAXSIZE 8void backtrack(int m,int row,in 阅读全文
posted @ 2012-03-02 21:47 AndyDHG 阅读(475) 评论(0) 推荐(0) 编辑