回溯
文章平均质量分 62
Beating_spark
Even a beating_spark can light a fire of wisdom!
展开
-
dfs回溯的注意事项
回溯可能是多个量回溯 别忘了 比如void dfs(int n,int temp){ if(n==10) {if(temp<min) min=temp;return;} if(temp>min) return; for(int i=1;i<=9;i++) if(!vis[i]) { int j;原创 2016-03-19 10:16:59 · 1371 阅读 · 0 评论 -
The Rotation Game uva1343
#include #include #include #include #include #include using namespace std;#define N 10int n;int mat[N][N];int pos=0;int ans[100];bool read(){ if(cin>>mat[1][3]&&mat[1][3]) { c原创 2016-10-08 03:49:23 · 237 阅读 · 0 评论