只写子函数了,犯懒。
搜索练完后就要愉快的跟数据结构玩耍啦!
void dfs(int x,int y,int t) {
if(over(x, y, t)) return;
for(int i=1; i<=n; i++) {//扩展所有可能
int _x=x+move[i][0];
int _y=y+move[i][1];
if(check(_x, _y)) change(_x, _y);
dfs(_x,_y,t+1);
}
}
只写子函数了,犯懒。
搜索练完后就要愉快的跟数据结构玩耍啦!
void dfs(int x,int y,int t) {
if(over(x, y, t)) return;
for(int i=1; i<=n; i++) {//扩展所有可能
int _x=x+move[i][0];
int _y=y+move[i][1];
if(check(_x, _y)) change(_x, _y);
dfs(_x,_y,t+1);
}
}
转载于:https://www.cnblogs.com/Xray-luogu/p/8010515.html