#include#include#include#include#include#include#include#include#include#include#define CLEAR(tar) memset(tar,0,sizeof(tar))using namespace std;char pre[5],ans[5];int cnt;void dfs(int cur,int t){\x05if(cur==4){\x05\x05if(t

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/17 12:51:31

#include#include#include#include#include#include#include#include#include#include#define CLEAR(tar) memset(tar,0,sizeof(tar))using namespace std;char pre[5],ans[5];int cnt;void dfs(int cur,int t){\x05if(cur==4){\x05\x05if(t
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define CLEAR(tar) memset(tar,0,sizeof(tar))
using namespace std;
char pre[5],ans[5];
int cnt;
void dfs(int cur,int t){
\x05if(cur==4){
\x05\x05if(t

#include#include#include#include#include#include#include#include#include#include#define CLEAR(tar) memset(tar,0,sizeof(tar))using namespace std;char pre[5],ans[5];int cnt;void dfs(int cur,int t){\x05if(cur==4){\x05\x05if(t
首先,我感觉这道题最好用广搜,不适合深搜.深搜时间复杂度会大很多
而且你的深搜也不对,目测你至少没有考虑两个相邻数交换的这种情况.如果你的代码是错的,最好还是加上注释,不然看到还是很累的.