#include<stack>
#include<iostream>
#include<windows.h>
#include<ctime>
#include<stdlib.h>
#include<stdio.h>
using namespace std;
int maze[12][12]=
{
{0,0,0,0,0,0,0,0,0,0,0,0},
{0,1,1,0,1,1,1,1,0,0,1,0},
{0,1,1,0,1,1,0,1,1,0,1,0},
{0,1,1,1,1,0,1,1,0,0,1,0},
{0,0,0,1,0,0,0,1,1,1,0,0},
{0,0,1,1,1,0,1,0,0,1,0,0},
{0,0,1,0,0,1,1,1,1,0,0,0},
{0,0,1,1,1,1,0,0,1,0,0,0},
{0,0,1,0,0,1,0,0,1,1,1,0},
{0,0,0,0,0,0,0,0,0,0,1,0},
{0,0,0,0,0,0,0,0,0,0,1,0},
{0,0,0,0,0,0,0,0,0,0,0,0}
};
typedef struct
{
int x;
int y;
}jiegou;
stack<jiegou>z;
void xunlu(int maze[12][12])
{
int mark[12][12]={0};
int g,h;
jiegou a,b;
a.x=1,a.y=1;
z.push(a);
mark[1][1]=1;
while(!(b.x==10&&b.y==10)&&!(z.empty()))
{
b=z.top();
g=b.y;
h=b.x;
if(((maze[g][h+1]==1)||(maze[g][h+1]==5))&&(mark[g][h+1]==0))
{
b.x=h+1;
mark[g][h+1]=1;
for(int i=0;i<=11;i++)
{
for(int j=0;j<=11;j++)
{
if(mark[i][j]==1&&maze[i][j]==1)
{
cout<<"☆";
}
else if(mark[i][j]==1&&maze[i][j]==5)
{
cout<<"# ";
}
else if(mark[i][j]==3)
{
cout<<"* ";
}
else{
if(maze[i][j]==0)
cout<<"●";
if(maze[i][j]==1)
cout<<"○";
}
}
cout<<endl;
}
Sleep(800);
system("cls");
maze[g][h+1]=5;
z.push(b);
}
else if(((maze[g+1][h]==1)||(maze[g+1][h]==5))&&(mark[g+1][h]==0))
{
b.y=g+1;
mark[g+1][h]=1;
for(int i=0;i<=11;i++)
{
for(int j=0;j<=11;j++)
{
if(mark[i][j]==1&&maze[i][j]==1)