poj2965 The Pilots Brothers‘ refrigerator (枚举,DFS,回溯)
回溯要写吐了,都没写出来
代码里是用DFS的步数num作为ans[num]来存的回溯
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string.h>
#include<iostream>
#include<cmath>
using namespace std;
int map[10][10],flag=0,ans;
struct bbq
{
in
原创
2020-10-03 23:29:37 ·
147 阅读 ·
0 评论