| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 55144 | 202203xhl | 走迷宫 | C++ | Compile Error | 0 | 0 MS | 0 KB | 447 | 2022-07-29 21:38:04 |
#include<bits/stdc++.h> using namespace std; int a[10][10],n,ans,st[10][10]; int dx[9]={0,0,1,1,1,0,-1,-1,-1},dy[9]={0,1,1,0,-1,-1,-1,0,1}; void dfs(int x,int y){ if(x==1&&y==n){ ans++; return; } for(int i=1;i<=8;i++){ if(st[x][y]==0&&a[x][y]==0){ st[x][y]=1; dfs(x+dx[i],y+d[y]); st[x][y]=0; } else return; } } int main(){ cin>>n; for(int i=1;i<=k;i++){ cin>>a[i][j]; } dfs(1,1); return 0; }