#include #include #include using namespace std; bool key[109][109],s[11009][1009],visit[11009][1009]; int n,m; int nm,mm; bool in(int y) { if(y>=0&&y0&&!visit[i][j-1]) j-=2; } } } if(!flag) break; } if(i>=nm) printf("The key can fall through.\n"); else printf("The key falls to depth %d.\n",i-1); } return 0; }