Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
138405 | 马佳琪 | 迷宫问题 | C++ | 编译错误 | 0 | 0 MS | 0 KB | 609 | 2024-03-16 11:47:52 |
#include <bits/stdc++.h> using namespace std; using namespace std; int n,s; bool b[13][13]; const int dx[8]={0,0,1,1,1,-1,-1,-1}, dy[8]={1,-1,1,0,-1,1,0,-1}; void go(int x,int y){ if(x==1 && y==n) { s++; return; } int i,xx,yy; for(int i=0;i<=7;i++){ xx=x+dx[i]; yy=y+dy[i]; if(b[xx][yy]){ b[xx][yy]=false; go(xx,yy); b[xx][yy]=true; } } } int main(){ //freopen("migong.in","r",stdin); //freopen("migong.out","w",stdout); int i,j,x; cin>>n; memset(b,0,sizeof) cout<<s<<endl; //fclose(stdin); //fclose(stdout); } //小迷宫,未完成