USACO section 2.4 Overfencing(dfs+bfs)

Overfencing
Kolstad and Schrijvers

Farmer John went crazy and created a huge maze of fences out in a field. Happily, he left out two fence segments on the edges, and thus created two "exits" for the maze. Even more happily, the maze he created by this overfencing experience is a `perfect' maze: you can find a way out of the maze from any point inside it.

Given W (1 <= W <= 38), the width of the maze; H (1 <= H <= 100), the height of the maze; 2*H+1 lines with width 2*W+1 characters that represent the maze in a format like that shown later - then calculate the number of steps required to exit the maze from the `worst' point in the maze (the point that is `farther' from either exit even when walking optimally to the closest exit). Of course, cows walk only parallel or perpendicular to the x-y axes; they do not walk on a diagonal. Each move to a new square counts as a single unit of distance (including the move "out" of the maze.

Here's what one particular W=5, H=3 maze looks like:

+-+-+-+-+-+
|         |
+-+ +-+ + +
|     | | |
+ +-+-+ + +
| |     |  
+-+ +-+-+-+

Fenceposts appear only in odd numbered rows and and odd numbered columns (as in the example). The format should be obvious and self explanatory. Each maze has exactly two blank walls on the outside for exiting.

PROGRAM NAME: maze1

INPUT FORMAT

 

Line 1: W and H, space separated
Lines 2 through 2*H+2: 2*W+1 characters that represent the maze

SAMPLE INPUT (file maze1.in)

5 3
+-+-+-+-+-+
|         |
+-+ +-+ + +
|     | | |
+ +-+-+ + +
| |     |  
+-+ +-+-+-+

OUTPUT FORMAT

A single integer on a single output line. The integer specifies the minimal number of steps that guarantee a cow can exit the maze from any possible point inside the maze.

SAMPLE OUTPUT (file maze1.out)

9

The lower left-hand corner is *nine* steps from the closest exit.

思路:找到出口开始搜索,广搜找当前点到出口的最短路更新答案,深搜找到下一个要更新的点。

  因为是从出口处开始深搜广搜结合搜索,因此广搜的花费很小,最多只需要搜前后左右4个点即可得到答案。

具体看代码:

这题很苦逼,我提交了8次才过,第一次是BFS直接广搜所以点,毫无疑问爆了。

就改成深广结合,结果就在原先基础上改,犯了低级错误,改了许多版本,最后才明白走入死胡同。

最后才把深广很好的结合,AC了,速度也很快11MS,内存差不多就是纯深搜的内存。还算是不错的。

八次提交代码一起给了。

 

/*
 ID:nealgav1
 LANG:C++
 PROG:maze1
*/
#include<fstream>
#include<cstring>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
int kans[mm][mm];
int ans;
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{ public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
void bfs(int x,int y)
{ bool flag=0;
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)///bfs广搜找出当前点到出口的最短路
  {
    if(flag)break;
    for(int i=0;i<4;i++)
    {nx=f[front].x+kx[i];ny=f[front].y+ky[i];
     if(map[nx][ny]==' ')
     { nx=nx+kx[i];ny=ny+ky[i];
      if(nx<0||nx>=n||ny<0||ny>=m)
      { kans[x][y]=f[front].step+1;
        ///if(kans[x][y]>ans)ans=kans[x][y];
        flag=1;
      }
      else if(kans[nx][ny])
      { if((kans[x][y]==0)||(kans[x][y]>kans[nx][ny]+f[front].step+1))
          {

           kans[x][y]=kans[nx][ny]+f[front].step+1;
            //if(kans[x][y]!=0&&kans[x][y]+1<kans[nx][ny])
            //bfs[nx][ny];
            /*for(int ii=0;ii<4;ii++)
            { int nnx=x+kx[ii],nny=y+ky[ii];
             if(map[nnx][nny]==' ')
             {nnx=nnx+kx[ii];nny=nny+ky[ii];
             if((nnx>=0&&nnx<n&&nny>=0&&nny<m&&kans[x][y]+1<kans[nnx][nny])||(kans[nnx][nny]==0))
             bfs(nnx,nny);
             }
            }*/
          }
      // if(x==3&&y==1)cout<<"nx="<<nx<<"ny="<<ny<<kans[nx][ny]<<" "<<f[front].step<<endl;
      /// if(kans[x][y]>ans)ans=kans[x][y];
       flag=1;
      }
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }

     }
    }
    ++front;
           if(kans[x][y])///dfs深搜找下一个需要更新的点
           for(int ii=0;ii<4;ii++)
            { int nnx=x+kx[ii],nny=y+ky[ii];
             if(map[nnx][nny]==' ')
             {nnx=nnx+kx[ii];nny=nny+ky[ii];
             if((nnx>=0&&nnx<n&&nny>=0&&nny<m&&kans[x][y]+1<kans[nnx][nny])||(kans[nnx][nny]==0))
             bfs(nnx,nny);
             }
            }
  }

 /* for(int k=0;k<4;k++)
  {
    nx=x+kx[k];ny=y+ky[k];
    if(nx<0||nx>=n||ny<0||ny>=m)continue;
    if(map[nx][ny]==' ')
    { nx=nx+kx[k];ny=ny+ky[k];
      if(nx>=0&&nx<n&&ny>=0&&ny<m&&!vis[nx][ny])
      bfs(nx,ny);
    }
  }*/

}
int main()
{
  cin>>m>>n;
  memset(kans,0,sizeof(kans));
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int num=0;
  for(int i=0;i<n;i++)///找出口,开始搜索,其实只要搜一个出口就行
  {                   ///但是搜两个也行,因为第一次已经完成所有工作,所以第二个出口花费最多为4
    if(map[i][0]==' ')
    {
      ///ans=0;
      bfs(i,1);
    }
    else if(map[i][m-1]==' ')
    {
      ///ans=0;
      bfs(i,m-2);
    }
  }
  for(int i=0;i<m;i++)
  {
     if(map[0][i]==' ')
    {
      ///ans=0;
      bfs(1,i);
    }
    else if(map[n-1][i]==' ')
    {
      ///ans=0;
      bfs(n-2,i);
    }
  }
  for(int i=1;i<n;i+=2)
  for(int j=1;j<m;j+=2)
  if(kans[i][j]>num)num=kans[i][j];
  cout<<num<<"\n";
  //cin>>m;
}

/**
#include<fstream>
#include<cstring>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
int kans[mm][mm];
bool vis[mm][mm];
int ans;
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{
  public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
void bfs(int x,int y)
{ bool flag=0;
  vis[x][y]=1;
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)
  { if(flag)break;
    for(int i=0;i<4;i++)
    {
      nx=f[front].x+kx[i];ny=f[front].y+ky[i];

     if(map[nx][ny]==' ')
     { //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
       nx=nx+kx[i];ny=ny+ky[i];
       //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
      if(nx<0||nx>=n||ny<0||ny>=m)
      { kans[x][y]=f[front].step+1;
        if(kans[x][y]>ans)ans=kans[x][y];
        flag=1;break;
      }
      else if(kans[nx][ny])
      { for(int z=0;z<4;z++)
        {
          nx=f[front].x+kx[z];
          ny=f[front].y+ky[z];
          //if(x==3&&y==3)
          //cout<<nx<<" "<<ny<<" "<<"kans[nx][ny]"<<kans[nx][ny]<<endl;
          if(map[nx][ny]==' ')
          { nx=nx+kx[z];ny=ny+ky[z];
           if(kans[nx][ny])
           {
           if((kans[x][y]==0)||(kans[x][y]>kans[nx][ny]+f[front].step+1))
           kans[x][y]=kans[nx][ny]+f[front].step+1;
            for(int ii=0;ii<4;ii++)
            { int nnx=x+kx[ii],nny=y+ky[ii];
             if(map[nnx][nny]==' ')
             {//f[rear].x=x+2*kx[ii];
             //f[rear].y=y+2*ky[ii];
             //f[rear].step=kans[x+2*kx[ii]][y+2*ky[ii]];rear++;
             nnx=nnx+kx[ii];nny=nny+ky[ii];
             if(nnx>=0&&nnx<n&&nny>=0&&nny<m&&kans[x][y]+1<kans[nnx][nny])
             bfs(nnx,nny);
             ;
             }
            }
           }
          }

        }
      // if(x==3&&y==1)cout<<"nx="<<nx<<"ny="<<ny<<kans[nx][ny]<<" "<<f[front].step<<endl;
       if(kans[x][y]>ans)ans=kans[x][y];
       flag=1;
      }
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }
     }
    }
    ++front;
  }
  for(int k=0;k<4;k++)
  {
    nx=x+kx[k];ny=y+ky[k];
    if(nx<0||nx>=n||ny<0||ny>=m)continue;
    if(map[nx][ny]==' ')
    { nx=nx+kx[k];ny=ny+ky[k];
      if(nx>=0&&nx<n&&ny>=0&&ny<m&&!vis[nx][ny])
      bfs(nx,ny);
    }
  }

}
int main()
{
  cin>>m>>n;
  memset(kans,0,sizeof(ans));
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int num;
  //bool flag=0;
  for(int i=0;i<n;i++)
  {
    if(map[i][0]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,1);
    }
    else if(map[i][m-1]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,m-2);
    }
  }
  for(int i=0;i<m;i++)
  { //if(flag)break;
     if(map[0][i]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(1,i);
    }
    else if(map[n-1][i]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(n-2,i);
    }
  }
  cout<<ans<<"\n";
  //cin>>m;
}
*/
/**
#include<fstream>
#include<cstring>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
int kans[mm][mm];
bool vis[mm][mm];
int ans;
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{
  public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
void bfs(int x,int y)
{ bool flag=0;
  vis[x][y]=1;
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)
  { if(flag)break;
    for(int i=0;i<4;i++)
    {
      nx=f[front].x+kx[i];ny=f[front].y+ky[i];

     if(map[nx][ny]==' ')
     { //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
       nx=nx+kx[i];ny=ny+ky[i];
       //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
      if(nx<0||nx>=n||ny<0||ny>=m)
      { kans[x][y]=f[front].step+1;
        if(kans[x][y]>ans)ans=kans[x][y];
        flag=1;break;
      }
      else if(kans[nx][ny])
      { for(int z=0;z<4;z++)
        {
          nx=f[front].x+kx[z];
          ny=f[front].y+ky[z];
          //if(x==3&&y==3)
          //cout<<nx<<" "<<ny<<" "<<"kans[nx][ny]"<<kans[nx][ny]<<endl;
          if(map[nx][ny]==' ')
          { nx=nx+kx[z];ny=ny+ky[z];
           if(kans[nx][ny])
           {
           if((kans[x][y]==0)||(kans[x][y]>kans[nx][ny]+f[front].step+1))
           kans[x][y]=kans[nx][ny]+f[front].step+1;
            for(int ii=0;ii<4;ii++)
            if(kans[x][y]+1<kans[x+2*kx[ii]][y+2*ky[ii]])
            {//f[rear].x=x+2*kx[ii];
             //f[rear].y=y+2*ky[ii];
             //f[rear].step=kans[x+2*kx[ii]][y+2*ky[ii]];rear++;

             bfs(x+2*kx[ii],y+2*ky[ii]);
            }
           }
          }

        }
      // if(x==3&&y==1)cout<<"nx="<<nx<<"ny="<<ny<<kans[nx][ny]<<" "<<f[front].step<<endl;
       if(kans[x][y]>ans)ans=kans[x][y];
       flag=1;
      }
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }
     }
    }
    ++front;
  }
  for(int k=0;k<4;k++)
  {
    nx=x+kx[k];ny=y+ky[k];
    if(nx<0||nx>=n||ny<0||ny>=m)continue;
    if(map[nx][ny]==' ')
    { nx=nx+kx[k];ny=ny+ky[k];
      if(nx>=0&&nx<n&&ny>=0&&ny<m&&!vis[nx][ny])
      bfs(nx,ny);
    }
  }

}
int main()
{
  cin>>m>>n;
  memset(kans,0,sizeof(ans));
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int num;
  //bool flag=0;
  for(int i=0;i<n;i++)
  {
    if(map[i][0]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,1);
    }
    else if(map[i][m-1]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,m-2);
    }
  }
  for(int i=0;i<m;i++)
  { //if(flag)break;
     if(map[0][i]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(1,i);
    }
    else if(map[n-1][i]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(n-2,i);
    }
  }
  cout<<ans<<"\n";
  //cin>>m;
}
*/
/**
#include<fstream>
#include<cstring>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
int kans[mm][mm];
bool vis[mm][mm];
int ans;
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{
  public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
void bfs(int x,int y)
{ bool flag=0;
  vis[x][y]=1;
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)
  { if(flag)break;
    for(int i=0;i<4;i++)
    {
      nx=f[front].x+kx[i];ny=f[front].y+ky[i];

     if(map[nx][ny]==' ')
     { //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
       nx=nx+kx[i];ny=ny+ky[i];
       //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
      if(nx<0||nx>=n||ny<0||ny>=m)
      { kans[x][y]=f[front].step+1;
        if(kans[x][y]>ans)ans=kans[x][y];
        flag=1;break;
      }
      else if(kans[nx][ny])
      { for(int z=0;z<4;z++)
        {
          nx=f[front].x+kx[z];
          ny=f[front].y+ky[z];
          //if(x==3&&y==3)
          //cout<<nx<<" "<<ny<<" "<<"kans[nx][ny]"<<kans[nx][ny]<<endl;
          if(map[nx][ny]==' ')
          { nx=nx+kx[z];ny=ny+ky[z];
           if(kans[nx][ny])
           {
           if((kans[x][y]==0)||(kans[x][y]>kans[nx][ny]+f[front].step+1))
           kans[x][y]=kans[nx][ny]+f[front].step+1;
           }
          }

        }
      // if(x==3&&y==1)cout<<"nx="<<nx<<"ny="<<ny<<kans[nx][ny]<<" "<<f[front].step<<endl;
       if(kans[x][y]>ans)ans=kans[x][y];
       flag=1;
      }
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }
     }
    }
    ++front;
  }
  for(int k=0;k<4;k++)
  {
    nx=x+kx[k];ny=y+ky[k];
    if(nx<0||nx>=n||ny<0||ny>=m)continue;
    if(map[nx][ny]==' ')
    { nx=nx+kx[k];ny=ny+ky[k];
      if(nx>=0&&nx<n&&ny>=0&&ny<m&&!vis[nx][ny])
      bfs(nx,ny);
    }
  }

}
int main()
{
  cin>>m>>n;
  memset(kans,0,sizeof(ans));
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int num;
  //bool flag=0;
  for(int i=0;i<n;i++)
  {
    if(map[i][0]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,1);
    }
    else if(map[i][m-1]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,m-2);
    }
  }
  for(int i=0;i<m;i++)
  { //if(flag)break;
     if(map[0][i]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(1,i);
    }
    else if(map[n-1][i]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(n-2,i);
    }
  }
  cout<<ans<<"\n";
 // cin>>m;
}
*/
/**
#include<fstream>
#include<cstring>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
int kans[mm][mm];
bool vis[mm][mm];
int ans;
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{
  public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
void bfs(int x,int y)
{ bool flag=0;
  vis[x][y]=1;
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)
  { if(flag)break;
    for(int i=0;i<4;i++)
    {
      nx=f[front].x+kx[i];ny=f[front].y+ky[i];

     if(map[nx][ny]==' ')
     { //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
       nx=nx+kx[i];ny=ny+ky[i];
       //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
      if(nx<0||nx>=n||ny<0||ny>=m)
      { kans[x][y]=f[front].step+1;
        if(kans[x][y]>ans)ans=kans[x][y];
        flag=1;break;
      }
      else if(kans[nx][ny])
      { for(int z=0;z<4;z++)
        {
          nx=f[front].x+2*kx[z];
          ny=f[front].y+2*ky[z];
          //if(x==3&&y==3)
          //cout<<nx<<" "<<ny<<" "<<"kans[nx][ny]"<<kans[nx][ny]<<endl;
          if(kans[nx][ny])
          {
           if((kans[x][y]==0)||(kans[x][y]>kans[nx][ny]+f[front].step+1))
           kans[x][y]=kans[nx][ny]+f[front].step+1;
          }

        }
      // if(x==3&&y==1)cout<<"nx="<<nx<<"ny="<<ny<<kans[nx][ny]<<" "<<f[front].step<<endl;
       if(kans[x][y]>ans)ans=kans[x][y];
       flag=1;
      }
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }
     }
    }
    ++front;
  }
  for(int k=0;k<4;k++)
  {
    nx=x+2*kx[k];ny=y+2*ky[k];
    if(nx<0||nx>=n||ny<0||ny>=m)continue;
    if(!vis[nx][ny])
    bfs(nx,ny);
  }

}
int main()
{
  cin>>m>>n;
  memset(kans,0,sizeof(ans));
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int num;
  //bool flag=0;
  for(int i=0;i<n;i++)
  {
    if(map[i][0]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,1);
    }
    else if(map[i][m-1]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(i,m-2);
    }
  }
  for(int i=0;i<m;i++)
  { //if(flag)break;
     if(map[0][i]==' ')
    { memset(vis,0,sizeof(vis));
      ans=0;
      bfs(1,i);
    }
    else if(map[n-1][i]==' ')
    {memset(vis,0,sizeof(vis));
      ans=0;
      bfs(n-2,i);
    }
  }
  cout<<ans<<"\n";
 // cin>>m;
}
*/
/**#include<fstream>
#include<cstring>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
int kans[mm][mm];
int ans;
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{
  public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
void bfs(int x,int y)
{ bool flag=0;
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)
  { if(flag)break;
    for(int i=0;i<4;i++)
    {
      nx=f[front].x+kx[i];ny=f[front].y+ky[i];

     if(map[nx][ny]==' ')
     { //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
       nx=nx+kx[i];ny=ny+ky[i];
       //if(x==3&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
      if(nx<0||nx>=n||ny<0||ny>=m)
      { kans[x][y]=f[front].step+1;
        if(kans[x][y]>ans)ans=kans[x][y];
        flag=1;break;
      }
      else if(kans[nx][ny])
      { for(int z=0;z<4;z++)
        {
          nx=f[front].x+2*kx[z];
          ny=f[front].y+2*ky[z];
          //if(x==3&&y==3)
          //cout<<nx<<" "<<ny<<" "<<"kans[nx][ny]"<<kans[nx][ny]<<endl;
          if(kans[nx][ny])
          {
           if((kans[x][y]==0)||(kans[x][y]>kans[nx][ny]+f[front].step+1))
           kans[x][y]=kans[nx][ny]+f[front].step+1;
          }

        }
      // if(x==3&&y==1)cout<<"nx="<<nx<<"ny="<<ny<<kans[nx][ny]<<" "<<f[front].step<<endl;
       if(kans[x][y]>ans)ans=kans[x][y];
       flag=1;
      }
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }
     }
    }
    ++front;
  }
  for(int k=0;k<4;k++)
  {
    nx=x+2*kx[k];ny=y+2*ky[k];
    if(nx<0||nx>=n||ny<0||ny>=m)continue;
    if(kans[nx][ny]==0)
    bfs(nx,ny);
  }

}
int main()
{
  cin>>m>>n;
  memset(kans,0,sizeof(ans));
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int num;
  ans=0;
  //bool flag=0;
  for(int i=0;i<n;i++)
  {
    if(map[i][0]==' ')
    { bfs(i,1);
    }
    else if(map[i][m-1]==' ')
    {
      bfs(i,m-2);
    }
  }
  for(int i=0;i<m;i++)
  { //if(flag)break;
     if(map[0][i]==' ')
    { bfs(1,i);
    }
    else if(map[n-1][i]==' ')
    {
      bfs(n-2,i);
    }
  }
  cout<<ans<<"\n";
 // cin>>m;
}
*/
/**#include<fstream>
using namespace std;
const int mm=444;
const int nn=123456;
const int oo=1e9;
const int dx[]={0,2,-2,0};
const int dy[]={2,0,0,-2};
const int kx[]={0,1,-1,0};
const int ky[]={1,0,0,-1};
ifstream cin("maze1.in");
ofstream cout("maze1.out");
class node
{
  public:
  int x,y,step;
}f[nn];
char map[mm][mm];
int m,n;
int bfs(int x,int y)
{
  int rear=1,front=0;
  f[front].step=0;f[front].x=x;f[front].y=y;
  int nx,ny;
  while(front<rear)
  {
    for(int i=0;i<4;i++)
    {
      nx=f[front].x+kx[i];ny=f[front].y+ky[i];

     if(map[nx][ny]==' ')
     { //if(x==1&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
       nx=nx+kx[i];ny=ny+ky[i];
      // if(x==1&&y==1)
       //cout<<"nx="<<nx<<"ny"<<ny<<endl;
      if(nx<0||nx>=n||ny<0||ny>=m)return f[front].step;
      else
      {
        f[rear].x=nx;f[rear].y=ny;f[rear].step=f[front].step+1;
        ++rear;
      }
     }
    }
    ++front;
  }
  return -1;
}
int main()
{
  cin>>m>>n;
  m=2*m+1;n=2*n+1;
  cin.ignore(9999,'\n');
  for(int i=0;i<n;i++)
  cin.getline(map[i],9999,'\n');
  int ans=0;
  int num;
  for(int i=1;i<n;i+=2)
  for(int j=1;j<m;j+=2)
  { //if(map[i][j]==' ')
    num=bfs(i,j)+1;
    //cout<<i<<" "<<j<<endl;
    if(num>ans)ans=num;
    //cout<<num<<endl;
  }
  cout<<ans<<"\n";
 // cin>>m;
}
*/


 

 

 

 

 

 

 

USER: Neal Gavin Gavin [nealgav1]
TASK: maze1
LANG: C++

Compiling...
Compile: OK

Executing...
   Test 1: TEST OK [0.000 secs, 5748 KB]
   Test 2: TEST OK [0.000 secs, 5748 KB]
   Test 3: TEST OK [0.000 secs, 5748 KB]
   Test 4: TEST OK [0.000 secs, 5748 KB]
   Test 5: TEST OK [0.000 secs, 5748 KB]
   Test 6: TEST OK [0.000 secs, 5916 KB]
   Test 7: TEST OK [0.000 secs, 5748 KB]
   Test 8: TEST OK [0.000 secs, 5748 KB]
   Test 9: TEST OK [0.011 secs, 5748 KB]
   Test 10: TEST OK [0.011 secs, 6052 KB]

All tests OK.

Your program ('maze1') produced all correct answers! This is your submission #8 for this problem. Congratulations!

Here are the test data inputs:

------- test 1 ----
1 1
+-+
   
+-+
------- test 2 ----
9 1
+-+-+-+-+ +-+-+-+-+
|                 |
+-+-+-+-+ +-+-+-+-+
------- test 3 ----
3 3
+-+-+-+
  |   |
+ + + +
|   | |
+-+-+ +
|     |
+-+ +-+
------- test 4 ----
8 7
+ + +-+-+-+-+-+-+
|   | |   |     |
+ + + + + + +-+ +
| | |   | | | | |
+ + + +-+ + + + +
|   | |   | |   |
+-+ + + +-+ +-+-+
|   |   |     | |
+ + +-+ + +-+ + +
|       |       |
+-+-+-+ +-+ +-+-+
|   |     | |   |
+ + + +-+ + + +-+
|     |         |
+-+-+-+-+-+-+-+-+
------- test 5 ----
25 25
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                 |
+ + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                  
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ +
------- test 6 ----
38 100
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
------- test 7 ----
30 75
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
                                                            |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
|                                                            
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
------- test 8 ----
38 100
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   |   | |     |   |   |   | |       |   | | |   |     |   |   |     | |    
+ +-+ + + + +-+ + +-+ + + + + +-+ + + + + + + + + + + + + + + +-+ + + + + + +
|     |       |       |   | |     | |   | | | | | | | | | | | | | | |   | | |
+ + +-+-+-+-+ +-+ + +-+ +-+-+-+ +-+-+-+-+ + + + +-+ + +-+ + + + + + +-+-+ + +
| | |   | |   | | | |         |       |     | | |   | |   |   | | |   |   | |
+ + + + + + + + + +-+ + +-+ +-+ + +-+-+ + + + + + +-+ + +-+ +-+ + + + + +-+ +
| |   |   | |   | | | |   |     | | |   | | | | |   | |   | | | | | |   |   |
+-+ + + +-+ + +-+-+ +-+ + + +-+ +-+ +-+ + + + + + + + + + + + + + + +-+-+-+-+
| | | | | | | | | |   | | |   |   | | | | | |     | |   | | |   | |   |   | |
+ + + + + +-+ + + +-+ +-+ + + + +-+ + + + +-+ +-+-+ +-+-+ + + +-+ + + + +-+ +
|   | | |   | |   | |   | | | | |   | | |   |   | |   |   | |   | | | | |   |
+-+ + + + + + + +-+ +-+ +-+-+ + + +-+ +-+ +-+ + + + + + +-+ + + + + +-+ + + +
| | | |   | |     |   | |   | | |     | |     | |   | |   | | |   |   | | | |
+ +-+ +-+-+ + +-+ +-+ + +-+ + + + + +-+ +-+ +-+-+ +-+-+ + + + + +-+-+-+ +-+ +
|   | |   | | |   | | |     | |   | |   | | |   | |   | | |   | |   |   | | |
+-+ + + + + +-+-+ + + + +-+ + +-+-+ + + + + + +-+-+ +-+ + +-+-+ + +-+ +-+ + +
| |   | | |   | |     | |   | | | | | | |   |   | | | | |   | | | | | | | | |
+ +-+ + + +-+ + +-+ + + +-+ +-+ + + + + +-+-+ + + + + + +-+ + + + + + + + + +
|   |   | | | |   | | | | |   | | |   |   | | |   | |   | | |     | |   | | |
+ + + +-+ + + + +-+ +-+ + + +-+ + + +-+ + + + +-+-+ + + + + +-+ +-+ + +-+ + +
| | | |   | |   | |   |   |       | |   | | |   |   | | | | |   |   | |   | |
+ + + +-+ + + +-+ + +-+ +-+ + +-+-+ +-+ +-+ + + + +-+ + + + + +-+ + + + +-+ +
| |   | | | |     |       | |   | | | |   |   |   | | | | | |   | | | | |   |
+-+ + + + + + +-+-+ + +-+ +-+-+ + + + +-+-+-+ +-+-+ +-+ + + +-+ + + + + + + +
|   | | |   |   |   |   | |   | | | |     |     |     | | |   |   |   |   | |
+ + + + + + + +-+ + +-+ + + +-+ + + + + +-+ +-+ + +-+-+ + + + + +-+ +-+ + +-+
| | | | | | |   | | | | |   | | | | | | |     |   |   | | | | | | | |   |   |
+-+ +-+ +-+ +-+ + + + + + +-+ + + + + + + + + + + + + + + +-+ + + + + + +-+-+
| |   | |   |   | |   | | |   | | | | | | | | | | | | | | | | | | | | | |   |
+ + +-+ + + +-+ +-+ +-+ + + + +-+ + +-+ + + + +-+-+-+ + + + +-+ + + + + + + +
| | |   | | | | | | |   | | | | | |   |   | |   | | | | |   | | | |   | | | |
+ + + +-+ + + + + + + + + + +-+ + + + + + +-+ +-+ + + + + +-+ + + + +-+ + + +
|     | | |   |   | | | |   | |     | | | | | |   | | | |   | | |   | | | | |
+-+ + + +-+ +-+-+ + +-+ + +-+ +-+ + +-+ + + + + + + + + + + + + + + + + + + +
|   | | | | | | | |   | | | |   | |   | | |   | | | | | | | |   | | | | | | |
+ +-+ + + + + + + + +-+-+ + + +-+ + + + +-+-+-+ +-+ + + + + + + + + + + + + +
| | | | | | | |   | |   |     | | | | | | | |   | | |     | | | | | |     | |
+ + + + + + + + + + + +-+-+ + + + +-+ + + + + +-+ + + + +-+ + + + + + +-+-+-+
| | | | |   | | | |   | |   | | | |   | | | |     | | |   | | | | | | | |   |
+ + + + + + + +-+-+ +-+ + + + + + + +-+ + + + + +-+ + + + + +-+ + + + + + +-+
|   | | | |   |     |   | | | | | | |       | | |   | | | | | | | | | | | | |
+ +-+ + + +-+-+ + + + +-+ + + + + +-+ +-+-+-+ +-+ +-+ + + + + + + + + + + + +
| | | | |   | | | | | | | | | | | | | | |           | | | | | | | | | | | | |
+-+ + + + + + +-+ +-+ + +-+-+-+ + + + + + +-+-+-+-+-+ + + + + +-+ + +-+ + + +
|     |   | |   |     |     | | |   | | |   |   |   | | | | | |   | |   | | |
+ + + + + +-+ +-+ + +-+-+-+ + + + +-+ + + +-+ + +-+ + +-+ +-+ +-+ +-+ + + + +
| | | | | |   | | | |   | |             |   | | | |   | | |     |   | | | | |
+ + + + +-+ +-+ +-+ + +-+ +-+-+ + + +-+ + + + + + +-+ + + + + +-+ + + + + + +
| | | |   | |     | | | | | |   | | |   | | | | | | | | | | | | | | | |     |
+ + + + + + + +-+ + + + + + + + + + +-+ + +-+ + + + + + + + + + + + + + +-+-+
| | | | | | |   | | | |       | | |   |   | | | | | | | |   | |   | | |   | |
+ +-+-+ +-+ + +-+ + + + +-+-+ + + + +-+-+ + + + + + + + + +-+-+-+ + + +-+-+ +
| |   |   | | | |   | | |   | | | |     | | | | | | | | |   |   | | |   |   |
+ +-+ + + + + + + + + +-+ +-+ + + + +-+ +-+ + + + + + + +-+ + + + + + +-+ +-+
| |   | |   |   | | | |   |   | | | | |   | | | | |   |   | | | | |   |   | |
+ + + + +-+-+ + + + + + + +-+ + +-+ + + +-+ + + + +-+-+-+ + + + +-+-+ + + + +
| | |   |   | | | | | | | |   | | | | |       | | |   |     | | |   | | | | |
+ + +-+ + + + + +-+ + +-+ + + + + + + + +-+-+ + + +-+ +-+-+ + + + + +-+ + + +
| | | | | | | | | | | | | | | | | | | | |   | | |   | | |   | | | |   | | | |
+ + + + +-+ + +-+ + + + + + + + + + + + + +-+-+ + +-+ + + + + +-+ + +-+ + + +
| | |     | | | | | | | | | | | |   |   | |   |     |   | | | |   | |   | | |
+ + +-+-+-+ + + + + + + + +-+-+-+-+ + + + +-+ + +-+-+-+ +-+ + + +-+ + +-+ + +
| | | | | |   | |   | | | |     |   | | |   | | |   | |   |   | |   | | | | |
+ + + + + +-+ + +-+ + + + + + + + + + +-+ +-+ +-+ +-+ +-+ + + + +-+ + + + + +
| | |   | |   | |     | | | | | | | |   | |     |   | | | | |     |   | | | |
+ +-+-+ + + + + +-+ + + + +-+ + + +-+-+ + + +-+ + +-+ + + + + +-+-+ +-+ + + +
| | |     | |   | | | |   | | | | |   | |     |   |   | | | | |   | | | | | |
+ + +-+ +-+ + + + + + +-+ + + + + + +-+ + +-+ + + + +-+ + + + + +-+ + + + + +
| | |     | | |   | | | | | | | | | | |     | | | | |   | | | | |   | | | | |
+ + + +-+ +-+-+ + +-+ + + + + + + + + + +-+-+ + + + + + + + + + +-+ + + + + +
| | | |   |   | | | |   | | | | | | | |     | | |     | | | | |   |   |     |
+ + + +-+ + + + +-+ + +-+ + + + + + + +-+ +-+ + + + +-+ + + + +-+ + + + +-+ +
|     |   | | |     | | | | | | | | |   | |   | | |   | |   | |   | | | |   |
+ +-+-+-+ + + + + + + + + + + + + + + + +-+-+ + + +-+ + +-+ + + +-+ + + + + +
| | |   | | | | | | | |   | | | |     | | | | | |   | | | | | |   | | | | | |
+ + +-+ + + + + +-+ + + +-+ + +-+ +-+-+ + + + + +-+ +-+-+ + + + +-+-+-+ + + +
| |   | | | | | |   |   |   |   | |   |   | | |   |   |   | | | | |   | | | |
+-+ + + + + + +-+ + + +-+ + +-+ + + + + + + + + + + +-+ + +-+ + + + + + + + +
|   | | | | |   | | | | | | | | |   | | |   | | | | |   | |   | | | | | | | |
+ + +-+ + + + +-+ + + + + + + + + +-+-+ +-+-+ + + + + +-+ +-+ + + + + + + + +
| |   | | | |   | | | | | | | |     | |   |   | | | |   |   | | | | | | | | |
+ +-+ + + + + + + + +-+ + + + +-+-+-+ + +-+ + +-+ + + +-+ +-+ + + + +-+ + + +
| | | |   | | | | | |   | | | |   | |   | | | | | | | | | | |   | |   | | | |
+ + +-+-+ + + + + + + +-+ + + + + + + +-+ + + + + + + + + + + +-+ + + + + +-+
| | |   | | | | | |       |   | | | | |   | |   | | | | | | |       | | | | |
+ + + +-+ + +-+ + + +-+ +-+ + + + + + + +-+ + +-+ + + + + + + +-+-+-+ + + + +
| | | | | | | | | | |   | | | | |   | |   | | |   | | | | |   | |   | | | | |
+ + + + + + + + + + + + + + + + + + + + + + + +-+-+ + + +-+-+ + + + + + +-+ +
| |     |   | | | | | | |   | | | | |   | | | |   | | |   |     | | | | |   |
+ +-+-+ + +-+ + + + + +-+-+-+ + + +-+ +-+ + + +-+ + + + + + + + + + + + + +-+
|     | | | |   | | | | |   | | | | |   | | | | | | | | | | | | | | | | | | |
+ + +-+ + + + +-+ + + + + + + + + + + +-+ +-+-+ + + + + + + + + + + +-+ + + +
| | |   |   | | | | | | | | | | | | | |   |   |   | |   | | | | | | | | | | |
+-+ +-+ + + + + + + + + + + + + + + + +-+ + + + + +-+ +-+ + + + + + + +-+ + +
| |   |   | |   | | | | | | |   | |   | | | | | | |   | | | | |   | | |   | |
+ +-+ + + + + + + + +-+ +-+ + + + +-+ + + + + +-+ + +-+ + + + + +-+ + + +-+ +
|   | | | | | | | |   | | | | | |   | | |   | |   |   |   | | | |   | | |   |
+-+ + + +-+ + + + + + + + + +-+ + +-+ + + +-+ + +-+ + +-+-+ +-+-+ + + + + + +
| | |   |   | | | | | | | |   | | | |   | | | | |   |   |   |   | |   | | | |
+ + +-+ + + + +-+ + + + + +-+ + +-+ + +-+ + + + + + + + + + + +-+ + +-+ + + +
|   | | | | | | | | |   | | | |   | | | | | | | | | | | | | | |   | | | | | |
+ + + +-+-+ + + + + + +-+ + + + + + + + + + + + + + + + + + + +-+ + + + + + +
| | |   | | | | | | | |   | |   |   | | | |       | | | | | | |   | | | | | |
+ + +-+ + +-+ + + + + + +-+ +-+ +-+ + + + +-+ +-+-+ + +-+ +-+ + + + + + + + +
| | | | |   | | | | |   | | |   | | |   | | |   |   | | | |   | | | | |   | |
+-+ + + +-+ + + + + + + + + +-+ + + + +-+-+ + + +-+ + + + + + + + + + + +-+ +
| | | |   | |   | | | | | | | |   | | |     | | | | | | | | | | | | | | | | |
+ + + +-+ + + +-+-+-+ + + + + +-+-+ + + + +-+ + + + +-+ +-+ + + + + + + + + +
|   |   | |       | | | |   |   | | | | | | | |   | |   |   |   | | |   |   |
+-+ +-+ + +-+ + + + + + + +-+ +-+ + + +-+ + +-+ +-+ + +-+ + +-+-+ + +-+ +-+-+
| |   | |   | | | | | | |   | | | | |   | | | |   | |   | | | |   | | | | | |
+ +-+ + +-+ + +-+ + + + + + + + + + + +-+ + + +-+ + + +-+-+-+ +-+ + + + + + +
| |   |   | |   | | | | | | |   | | | |     |   | | | | | | |   | | | | | | |
+ + + +-+ + + + + + + + + + + + + + + + +-+ + + + + + + + + + + + + + + + + +
| | |   |   | | | | | | | |   | | | | |   |   | | | | | | |   | | | |   | | |
+ +-+ + +-+ + + + + + + + + +-+-+ + + + + +-+-+ + + + + + + + + + + + +-+ + +
|   | |   | | | | | | |   |   | | | | | | | | | | |   |   | | | | |   |   | |
+ + + +-+ + + +-+ + + + +-+ + + + + + + + + + + + + +-+ + +-+ + + + +-+ +-+ +
| | | | |   | | |   | | | | |   | | | | |     | | | | | |   | | | | |   |   |
+-+ + + +-+ + + +-+-+ +-+ +-+ +-+ + + + +-+-+ + + + + + + +-+ + + + + +-+ +-+
| |   |     |   | | | |   | |   |   | | | | | | | | |   | | | |   | | |     |
+ +-+ + + + + +-+ + +-+ + + + +-+ +-+ + + + +-+ + +-+-+-+ + + +-+-+ + + +-+ +
|   | | | |   |   |   | | |   | | | |   | |     | | |   | | | |   | | | | | |
+ +-+ + + +-+ + +-+ +-+ + +-+ + + + + + + +-+ + + + + +-+ + + + + + + + + + +
| | | | |   |   |   |   | | | | | |   | | | | | | | | | | |   | | | | | | | |
+ + + + +-+ + +-+-+ + +-+ + +-+ + +-+-+ + + + + + + + + + +-+ + + + + + + +-+
| | | | | | | | | | | |     |   | |   | | | | | | | | |   | | | | |   | |   |
+ + + + + + + + + + + + +-+-+-+ + + + + + + + + + + + + +-+ + + + + +-+ + + +
| | | | | | | | | |   | | |   | | | |     | | | | | | |   | | | | | |   | | |
+ + + + + +-+ + + + +-+ + + + + + + +-+-+ + + +-+ + + + + + + +-+ + + +-+ + +
| |   | | |   |   | | | | | | |   |     | | | | | | |   | | |   | |   | | | |
+ +-+ + + + + + +-+ + + + + + +-+-+ +-+ + + + + + + + + + + + +-+ + +-+ +-+ +
|   | | | | | | | | | | |   | |   | | | |   | | | | | | | | | | |   | | | | |
+ + +-+ + + + + + + + + +-+ + + + + + +-+ +-+ + + + + + + + + + + +-+ + + + +
| |   | | | | |   | | | | | | | | | |   |   | | | | | | | | |   | |   |   | |
+-+-+ + + + + + +-+ + + + +-+ + + + + +-+-+-+ + + + + +-+ + + + + + +-+ + + +
|     | | | |   |     | |   |   | |   |     | |   | | | | | | | | | | | | | |
+-+ + + + + + +-+-+ + + + +-+-+ + + +-+ +-+-+ +-+ + + + + + + + + + + + + + +
|   |   | | | |     | | | |     |   |     | | | | | | | | | | | | | | | | | |
+ + +-+-+ + + + +-+-+-+ + +-+-+ +-+ + +-+ + + + + + + + + + + + + + + + + + +
| | |   |   |   |   | | | | | | | | |   | |     | | | | | | | | | | |   | | |
+ + + +-+ + + +-+ + + + + + + + + + + +-+ + + +-+ + + + + + + + + + + +-+-+ +
| | | | | | |   | | | |   | | | |   | | | | | |   | | | | | | | | | | |   | |
+-+ + + + + +-+ + + + + +-+ + + +-+ + + + +-+ +-+ + + + + + + +-+ + + +-+ + +
| | | | | | | | | | | | | | |   | |   | |   | | | | |   | | | | | |       | |
+ + + + + + + +-+ + + + + + +-+ + + + + + + + + + + + + + + + + + + +-+-+ + +
| | | |   | |   | |   |   | |   |   | | | | | | | |   | | | | | | | | |   | |
+ + + + + + + +-+ +-+ + +-+ +-+ + +-+ + + +-+ + + +-+ +-+ + + + + + + +-+-+ +
| | | | | | |   |   | | |   | | |   |   | |   | | | |   | | |   | |   | | | |
+ + + +-+ + + + +-+ + + + +-+ + + + + + +-+-+ + +-+ + +-+ + + + + + +-+ + + +
| | | | | | | | | | | | | |   | | | | | |     | |   | | | | | | |     | | | |
+ + + + + + + + + + + + + + + + + + + +-+ +-+ + + +-+ + + + + + + +-+-+ + + +
| | |   | |   | | | | | | | | | | | | | | | |   | |   | | | | | | |   |   | |
+ + + + + +-+-+ + + + + + + + +-+ +-+ + + + + +-+ + +-+ + + + + + + +-+ +-+ +
| | | | | |   | |   | | | | | |   |   |   |   |   | |   | |   | | | |   |   |
+ + +-+ + + +-+ +-+ +-+ + + + + + +-+ + + +-+ + +-+ + + + + + + + + + +-+ +-+
| | | | | | | | | | | |   | | | | | | | | | | | |   | | | | | | | |   |   | |
+ + + + + + + + + + + +-+-+ +-+ +-+ +-+ + + + + + +-+ + + + + + + + +-+ +-+ +
| | | |   | | |   |   |   |   | |   |   | | | | | |   | | | | | | | |   |   |
+ + + +-+ + + + +-+-+ + + + + + + + +-+ + + + + + + +-+ +-+ +-+ + + + + + + +
    | |   | | | |   | | | | | | | |   | | | | | |   | | | |   | | |   | | | |
+-+ + + + + + + +-+ + + + + + + + + +-+ + + + + + + + +-+ + + + + + +-+ + + +
| | | | |     | |     | | | | | | | |   | | |     | |   | | | | | | |     | |
+ + + + + + + + +-+ +-+ + + +-+ + + +-+-+ + + + + + + + + + + + + + + +-+-+ +
|   | | | | | | |   |   | |   |   | |   | |   | | | | |   | | | |   | | | | |
+ + + + + + +-+ + +-+ +-+-+ +-+ +-+ +-+ + +-+ +-+ + + +-+ + +-+ + + +-+ + + +
| | | | | | | | |   | |   | | |   | | | |   | | | | | | | | |   | | | | | | |
+ + + + + + + + + + + + + + + + + + + + + +-+ + + + + + + + + +-+ +-+ + + + +
| | | | | | | | | | | | |   | | | | | | | | | |   | | | | | | | | |       | |
+ + + + +-+ + + + + + + + +-+ + + + + + + + + +-+-+ + + + + +-+ + + +-+-+ + +
| | | | | |   | | |   | | | | | | | | |   |   |   |   |   | | | | | |   | | |
+ + + + + + +-+ + +-+-+ + + + + + + + +-+ +-+-+ + + +-+ +-+ + + + + + + + + +
| | |   |   | | | | |   | | | | | | | | | | | | | | |   |   |   | |   | | | |
+-+ +-+-+ + + + + + + + + + + + + + + + + + + +-+ +-+ + +-+ +-+ + + +-+ + + +
| | | | | | | | | |   | | |   | | |   |   |   | | | | | | |   |   | | | | | |
+ + + + + + + + + + +-+ + +-+ + + +-+ +-+ + + + + + + + + + + + + + + + +-+ +
| | | | | | | | | |   | |   | | |   | | | | | | | | | | |   | | |   | | | | |
+ + + + + +-+ + + + +-+ + +-+ + +-+-+-+ + + + + + + + +-+ + +-+-+-+-+ + + +-+
|     | |   |   |     | | |   | | | | | |   | | |   | | | |   |     | | |   |
+-+ + + + +-+ + + +-+ + +-+ +-+ + + + + + +-+ + + +-+ + + + + + + +-+ + + + +
| | | |   |   |   | | | |   | | | | | |   | | | |   | | | | | | | |   | | | |
+ + + +-+-+-+ + +-+ +-+ + +-+ + + + + +-+ + + + + +-+ + + +-+ +-+ + + + + +-+
| | |   |   | | |   | | | | |   | | |   |   |   | | | | | | | | | | | |   | |
+ + + +-+ +-+ + + +-+ + + + + + + + + + + +-+ +-+ + + + + + + + + + + + +-+ +
| | |   | |   | | |   |   | | | |   | |   | | |   | | | | | | | | | | | |   |
+ +-+ + + + + + + + +-+ +-+ + +-+ + + +-+ + +-+ + + + + + + + + + + + + + + +
|   | | |   | | | | | | |   | |   | | | | |   | | | | | | | |       | | | | |
+-+ + +-+-+-+ + + + + + + + + + +-+ + + + + + + +-+ + + + + + + +-+-+ + + + +
| | | | | |   | | | | | | |   | | | | | | | | | |   | | | | | | |   | | | | |
+ + + + + + + + + + + + +-+-+ + + + + + + + + + + + + + + + + + + + + + + + +
| |   | | | | | | | | | |   | | | | | | | | | | | | | | | | | | | | | | | | |
+ +-+ + + + + + + + + + + +-+ + + + + + + + + + + + + + + + + + + + + + + + +
|   | |   | | | | |   | | | |   | | | | | | | | | | | | | | | | | | | |   | |
+ + + +-+ + + + + +-+ + + + + +-+ + + + + + + + + + + + + + + + + + + + +-+ +
| |   | | | | | | | | | | | | |   | | | | | | | | | | | | | | | | | | | | | |
+ +-+ + + + + + + + + + + + + + + + + + +-+ + + +-+ + + + + + +-+ + + + + + +
| | | | |   | |     |   | | | | | | | |   | | |   | | | |   | | | | | | | | |
+ + + + +-+-+ + +-+ +-+ + + + + + + + + + + + + +-+ + + + +-+ + + + + + + + +
| |       |   | |   |     |   | |   |   |   |   |     |   |   |   |   | |   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
------- test 9 ----
38 100
+-+-+-+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       |                   | |   | |   |   |   |       |   | |   | | |   | |
+ +-+-+-+ +-+ +-+-+ + +-+ +-+ + +-+ + +-+-+ + +-+-+ + +-+ +-+ + +-+ + + +-+ +
|           |     | | |       | | | | |       | | | |     |   | | | |     | |
+-+ + +-+-+-+ +-+-+-+-+-+ + +-+ + + + + +-+-+ + + + +-+ +-+-+ + + + + +-+-+ +
|   |   | | | | | | | | | |         | |     |   |     |   | |   |   |     | |
+-+ +-+ + + +-+ + + + + +-+-+ +-+-+-+ + +-+-+-+ + +-+-+-+-+ + +-+-+ + + +-+ +
|   |           |           |             |   |         |   | |   | | |     |
+-+-+ + + +-+-+-+ +-+-+-+-+-+-+ + +-+ +-+ + + + +-+-+-+-+ +-+ + +-+ + +-+-+-+
|   | | |     |           |   | |   |   |   | | |   |   |   |               |
+-+ + +-+ + +-+ +-+-+-+-+-+ +-+-+-+-+-+ +-+-+-+-+ +-+ +-+-+ + + +-+-+ +-+-+-+
|     |   |                   | |   | | |     |       | |     |     |       |
+ + +-+ + + + +-+ + + +-+ +-+-+ + +-+ +-+ + +-+ +-+-+-+ + +-+ +-+-+-+ +-+ +-+
| | |   | | | | | | |   |     |           | |               |     | |   | | |
+-+ +-+-+ +-+ + +-+-+ +-+-+-+ + + +-+-+ + + + +-+ + + + + +-+-+-+-+ +-+-+-+ +
|     | | |     | | |       |   |     | | |     | | | | |   | |     | |     |
+ + +-+ + + +-+ + + +-+-+ +-+-+-+-+ + +-+-+-+-+ + + +-+-+-+-+ + +-+-+ +-+ + +
| | |     | |       |   |         | |         | | | |     |   | | | |     | |
+ +-+-+ +-+ +-+ + +-+-+ +-+ +-+-+-+ +-+-+-+-+-+-+-+ + +-+-+ +-+ + + + +-+-+-+
| |     |     | |     | |         |         | |   | |   | | | |       |     |
+ +-+ +-+-+-+-+ +-+-+-+ +-+-+-+-+ +-+-+-+-+-+ + +-+-+ +-+ + + + +-+ +-+ +-+ +
| |   |                         |     | |   | | | |             | | |     | |
+ +-+-+-+ + +-+ + + +-+-+-+-+ + +-+ +-+ +-+ + + + + +-+-+-+ + + + +-+ +-+-+ +
|   | |   | |   | |         | |   |     |                 | | |   |   | | | |
+ +-+ +-+ +-+-+ +-+-+ + +-+ + + + + +-+-+ +-+-+ +-+ +-+-+-+-+-+-+ + +-+ + +-+
| |       |         | | |   | | | |           |   |   | | |   |     | |     |
+ + + + +-+-+ +-+-+-+-+ +-+ +-+ +-+-+-+-+ +-+ + +-+ +-+ + + + + + + + + +-+ +
| | | | |             |   |   |       | |   | |   |         | | | |       | |
+ + + +-+ +-+ + +-+-+ + + + + +-+-+-+-+ +-+-+ +-+ +-+-+ +-+ +-+-+ +-+ + +-+-+
| | | |   |   |   | | | | | |               | | |   | | | |     |   | | |   |
+-+ + +-+-+ + +-+ + +-+ + + + + + +-+ +-+ +-+-+ +-+-+ +-+ +-+ +-+-+-+-+ + + +
|   | |     | | | | | | | | | | | |     |   | |             |       | |   | |
+-+ + + +-+ +-+ + + + +-+-+-+-+-+ +-+-+ + + + + + + +-+ +-+-+-+-+-+-+ + +-+ +
| | | | |       |       |       |   |   | |     | | |               | |   | |
+ +-+-+-+ + + + + +-+-+-+ +-+ +-+-+-+-+-+ + +-+-+-+ + + +-+ + + +-+ + +-+-+-+
|       | | | | |           |     |   |   |       | | |   | | |   |         |
+ +-+-+ +-+ + + + +-+ +-+-+-+-+-+-+ + +-+-+ + +-+-+-+-+-+-+-+-+-+-+-+ +-+-+ +
| | |       | | |   | | |   |       |   | | |                       |     | |
+-+ + +-+ + + + + + +-+ +-+ + + +-+-+-+-+ +-+-+ + +-+ + + +-+ +-+-+ +-+-+-+-+
|     |   | | | | |   |   |   |       |       | | | | | | |   |   | |       |
+ +-+-+-+-+ + +-+-+ +-+ +-+ + +-+ +-+-+-+ +-+ + +-+ +-+-+-+-+-+ +-+-+ +-+-+-+
| |         |   |         | |   |       | | | |         |       |   |       |
+ +-+ + + + + +-+ + +-+-+ + +-+-+-+-+-+ + + + + +-+-+-+-+ +-+-+-+ +-+ +-+ +-+
| |   | | | |   | | | |       |   | | | |   | |       |     |   |       |   |
+ + +-+ +-+-+ + + + + + +-+ +-+ +-+ + +-+ + +-+-+-+ +-+ +-+-+ +-+ +-+-+-+ +-+
| |   | | |   | | | |   |                 |   |   |             |   |   | | |
+-+ + + + +-+ +-+ + +-+ +-+-+ +-+-+-+-+-+-+-+ + +-+-+-+-+-+-+-+-+ +-+ +-+-+ +
|   | | | |   | | | |   |         |     | | |           | | |   |     |   | |
+-+ +-+-+ +-+ + +-+-+ + + +-+ + + + + +-+ + +-+-+-+-+-+-+ + + +-+ +-+-+ +-+ +
|   |             |   | | |   | |   |   |       |     | |             |   | |
+-+-+ +-+-+-+ +-+-+ + + +-+-+ + + +-+ +-+ +-+-+-+ +-+-+ + + +-+ +-+-+-+ +-+ +
|       | | |   |   | | |     | |   |   |   | |         | | | |   | |     | |
+ + +-+-+ + + + +-+ +-+ + + +-+ + +-+-+-+ +-+ + + +-+-+-+ +-+ +-+-+ + + +-+ +
| |   | |     |   |   | | |   | |               |   | | |   |   | |   |     |
+ + + + + + +-+-+ + +-+-+ + +-+ + +-+-+-+-+ +-+-+-+-+ + + +-+ + + + + +-+-+-+
| | | |   |     | |   |   | |   |         |   |   |           |     | |     |
+ + +-+-+ +-+-+-+ +-+-+-+-+-+-+ + +-+ + + +-+-+ +-+ +-+-+-+-+ +-+-+ +-+ +-+-+
| | |           |   | |         | |   | |         |       | |   | |   |   | |
+-+-+-+-+ + +-+-+-+-+ + +-+ + +-+-+ + +-+ + + +-+-+ + +-+ + +-+ + +-+-+ +-+ +
|         |       |     |   |     | |   | | | |     |   |     |       |     |
+-+-+-+ +-+ +-+ +-+-+-+ + +-+ + +-+ + +-+-+-+ +-+ + +-+-+-+-+-+-+ + +-+-+ +-+
| |   |   | |       |   | | | |   | |       | |   |       |   |   |       | |
+ +-+ + + +-+-+ +-+-+-+-+ + + +-+ +-+ +-+ +-+-+ +-+-+ +-+-+ + +-+-+ +-+ + + +
|       | |         |     |     |   |   |       |   |     | | | |     | |   |
+-+ + + +-+-+ + + +-+-+-+ + +-+-+ +-+ +-+-+ +-+ + + +-+-+-+ +-+ +-+-+-+ + + +
| | | |     | | |   |     |   |   |   |   | |     | |     | | |       | | | |
+ +-+ + +-+-+-+ + + +-+ + +-+ +-+-+-+ +-+ +-+-+-+-+-+ +-+-+ + + +-+ + +-+-+ +
|     |       | | |   | |   |   |         |       | | | | |       | | |   | |
+-+ + +-+ + + +-+ + +-+ + +-+ +-+ +-+ +-+ + +-+ +-+ + + + + +-+-+-+-+-+-+ + +
|   |   | | | |   | |   |   |   | |   |       |                   | | | | | |
+ + + +-+-+-+-+-+ +-+-+ + + +-+ + +-+ + +-+ + +-+ + +-+-+ + +-+-+-+ + + + + +
| | |         |   |   | | |   | | | | | |   |   | |     | |             |   |
+ + + +-+ + + +-+-+-+ + + +-+-+-+ + + + +-+ +-+ + +-+-+ +-+ + +-+-+-+-+ + +-+
| | | |   | |   |   |   | | |     |   | |     | |     | |   |     | | | |   |
+ +-+ + + +-+-+-+ + + +-+ + + +-+ +-+ +-+ + + + +-+ +-+ +-+ +-+-+-+ + +-+ +-+
|   | | | |     | |   |   |     |   | |   | | | |   | | | |     |     | |   |
+ + + +-+-+ + +-+-+ + + + + + +-+ +-+-+ + +-+-+ +-+ + +-+ + + +-+ +-+-+ + +-+
| | |   |   |     | | | | | |   |   |   |     | |     |   | |   | |     | | |
+ + +-+-+-+-+ +-+ + + +-+-+ + +-+ +-+-+ + +-+-+-+-+ + + + +-+-+-+ + + + +-+ +
| |     |     |     |     | | |   | |   |     |     |   |           | | | | |
+ + +-+-+-+ + + +-+ +-+ + +-+ +-+ + +-+ +-+ + +-+ + +-+ +-+ +-+-+-+ +-+-+ + +
| |     |   | | |   |   | |   |       |   | | |   |   |   |   |   |         |
+ + +-+ +-+ + + + + + + + + + + + + +-+-+-+-+ + + + +-+ +-+-+ + + + +-+-+ +-+
| |   | |   | | | | | | | | | | | |       |   | | | |     |     | |     | | |
+ +-+-+ +-+ +-+ +-+ + + +-+ +-+ +-+ + + +-+ +-+-+-+ +-+ +-+-+-+-+ + + + +-+ +
|     | | |   |   | | | |   |     | | |   | |         |         | | | |     |
+ + +-+-+ + +-+-+ + + +-+-+-+-+ + + +-+ +-+ + +-+ +-+ + + +-+-+ +-+-+ +-+-+-+
| | |     |     | | |   |       | | | | | | |   |   | | | |   | | |         |
+ + +-+-+ + +-+ + +-+ +-+-+ +-+ +-+-+ +-+ +-+ +-+-+ + +-+ + +-+-+ +-+ +-+-+ +
| | |         | | |   |   |   |             |     | | |     |       | |   | |
+ +-+-+ + +-+ +-+-+-+ +-+ +-+ + + + + + + + + +-+-+ + + + + + +-+-+-+ + +-+ +
|     | | |     |   | |       | | | | | | | |   |   | | | |   |     |     | |
+ + + + +-+-+ +-+-+ + +-+ + + + +-+ + +-+-+ +-+ +-+-+-+-+ + + + +-+ + + + +-+
| | | |   |     |     | | | | |   | |     | |         |   | |     | | | |   |
+-+ + + + + +-+-+-+-+ + + +-+ +-+-+ + +-+ +-+ +-+ + +-+-+ + +-+-+-+ +-+ + + +
|   | | | |     |   | |   |       | |   |   |   | |   | | | |   | |   | | | |
+-+ +-+ + +-+-+ +-+ + + + + + +-+ +-+ +-+-+-+-+ +-+ +-+ +-+ + +-+ +-+-+-+ + +
|     | | |       |   | | | | |   |           | |     |   | |         | | | |
+ + +-+-+ + +-+ + +-+ + +-+ +-+ +-+ + + + + + +-+ +-+ + + + + + +-+-+-+ + +-+
| |     | | |   | |   | |   |     | | | | | |   | |   | |     |   | |       |
+ +-+ +-+ +-+-+ +-+ +-+ +-+ +-+-+ +-+ +-+ + + +-+-+-+-+-+ + + +-+-+ +-+-+-+ +
|   | |   |       |   | |     |   |     | | |     |       | |   |         | |
+-+ +-+ + +-+ +-+-+-+ + + + +-+ + + + +-+ + +-+-+-+-+-+ +-+-+ + + +-+-+-+-+-+
|   |   |   |   |     | | |   | | | |   | |       |     |     |             |
+-+-+ + +-+ + +-+-+-+ +-+-+ +-+ + +-+ +-+-+-+ +-+ + +-+ + +-+ +-+ + +-+-+-+-+
|     | |   |     |     | |   | | | |   |       | | |   | |     | |       | |
+-+-+-+ +-+ + +-+-+-+-+ + + +-+-+ + + + +-+ + + +-+-+ + +-+-+ + +-+-+ +-+-+ +
|         | | |   |     |       | |   | |   | | |     |     | | | | | |     |
+ +-+ + +-+ + +-+ +-+-+-+-+ + +-+ + + + +-+-+ +-+ +-+ +-+ +-+ +-+ + +-+ +-+ +
| |   |   | | |         | | |   | | | |     | | |   |   |   |           |   |
+ + +-+ + +-+-+-+ + + + + + +-+ +-+-+-+-+-+ +-+ + + + + + + + +-+ +-+ + +-+-+
| | |   |   |     | | |       | | |             | | | | | | |   |   | |     |
+ + + + +-+-+-+-+ + +-+ +-+-+ +-+ +-+-+ +-+ +-+-+ + + +-+ +-+-+ + +-+-+ +-+-+
| | | | | |   |   | | |     |     |       |   |   | | |     |   |   | |     |
+ + + + + + + +-+ +-+ + +-+-+ +-+-+ +-+-+-+ +-+-+ + + +-+ +-+-+-+ +-+ +-+ + +
| | | |     | |   |         | |         |     |   | | |   | | |         | | |
+ +-+ + + + + +-+-+ +-+ + + +-+-+-+ +-+ +-+ +-+-+-+-+-+-+ + + + + + + +-+ +-+
|   | | | | | | |   |   | |       |   | |     | |         |   | | | |   |   |
+-+ +-+-+ +-+ + +-+-+-+-+ +-+-+-+ + +-+-+-+-+ + +-+ +-+-+ + +-+ +-+-+-+ +-+-+
|   |     | | |   | | | |   | |   |   |         |   |         |       |   | |
+-+-+ +-+ + + + +-+ + + + +-+ + + + +-+-+ +-+ + +-+-+ +-+ +-+ + + +-+-+-+ + +
|     |     | | |         |   | | | |     |   |   |   |   | | | | | |   |   |
+ +-+-+-+ +-+-+ +-+-+ + + + +-+-+ +-+-+-+ +-+ + +-+-+-+-+ + +-+-+-+ + +-+ +-+
|   |       |     | | | |   |   |   | |   |   |   |           | |   | | | | |
+-+-+ + +-+ +-+ + + +-+ + + + + +-+-+ +-+ +-+ +-+ +-+-+-+ + + + +-+ + + +-+ +
|     | |   |   |       | |   |       |     | |   |       | |               |
+ +-+ +-+-+ +-+-+-+ +-+ +-+-+-+ + + +-+-+ + +-+-+-+ + +-+ +-+-+-+-+ +-+ +-+-+
| | | |         |   |     |   | | |     | | |     | | |   | |   | |   |     |
+-+ +-+ + + + +-+-+-+-+ + + +-+ + + +-+ + +-+-+ +-+ +-+-+ + +-+ + +-+-+-+-+-+
|       | | |   | | |   |     | | | |   | |     |   |     |   |     |       |
+ + + + +-+-+-+-+ + +-+ +-+ +-+-+ +-+ +-+-+-+-+ +-+-+-+-+ + +-+ +-+-+ +-+-+ +
| | | |     |           |     |     | |   |                               | |
+ + +-+ +-+-+-+-+-+ + +-+ + +-+-+-+ +-+ +-+-+-+ +-+-+ + + + + +-+ +-+-+-+-+ +
| | |   |           |   | |     |         |     |     | | | |   |       |   |
+ +-+-+ +-+ +-+-+ + +-+ + + +-+-+-+-+ +-+-+-+-+-+-+ + +-+ + + +-+-+-+-+ +-+ +
| | |   |   |     |   | | |         |     |         | |   | |     |   |   | |
+-+ + +-+-+ + +-+ +-+-+-+ + + + + +-+ +-+-+-+-+-+ +-+ +-+-+-+ +-+-+ +-+ +-+-+
|     |     | |       |   | | | |   | | |         |   |   | |         |     |
+-+-+ +-+ + +-+ + +-+ + +-+ +-+ + +-+-+ +-+ + +-+ +-+-+ +-+ + +-+ + +-+-+-+-+
|     |   | |   |   | |   | |   | | | |   | |   |   |           | | | |     |
+-+-+-+-+ +-+-+-+ +-+-+ +-+-+-+ + + + + +-+-+ +-+ +-+ +-+ + +-+ + +-+ + + + +
|         |           |   |     |     | |       |   |   | | |   |       | | |
+ +-+ +-+ + +-+ +-+-+-+-+ +-+-+ + + +-+ +-+-+ +-+ + + + +-+-+-+ +-+ + +-+-+-+
|   | |   | |         | | |     | |         |   | | | |   | |     | |     | |
+ +-+-+-+-+ +-+ + +-+ + +-+ + + +-+ + +-+-+-+ +-+ + + +-+-+ + +-+ + + +-+ + +
| |         |   | |     |   | | |   |     |     | | | |         | | |   |   |
+-+ + + +-+ +-+ +-+-+ +-+-+-+ +-+-+-+ + + +-+ + +-+-+ +-+-+ + +-+ +-+-+ +-+-+
|   | | |   |     | |   |         |   | | |   | | |   |     | |     |       |
+-+ +-+ +-+-+ + +-+ + + +-+ + + +-+ + + +-+-+ + + +-+ +-+-+ +-+ +-+-+ + + + +
|   |   |     | |     | |   | | |   | |   |   | |     |       |     | | | | |
+-+ +-+ +-+-+-+ +-+ + + + +-+ + + +-+ + +-+-+-+ + + +-+-+-+ +-+ + + + + +-+-+
|   |   |   | | |   | | |   | | |   | |   |     | | |       |   | | | |     |
+ +-+-+ +-+ + + +-+-+-+-+-+ + +-+-+ +-+ +-+-+-+ + +-+ +-+ + +-+ + +-+ + +-+ +
| | |   |             |     |   |     |   |   | | |     | | | | | |   |   | |
+ + +-+-+-+ +-+ +-+-+-+-+-+ +-+-+ + + + +-+-+ +-+ + + +-+ + + +-+ +-+-+ +-+ +
| |   |       | |     | |   |     | | | |       | | | |   |     |     | |   |
+-+-+ +-+ + +-+ + +-+-+ + +-+-+-+ + + +-+-+-+ +-+ +-+ + +-+ + + + +-+-+-+-+ +
|       | |   |     | |       |   | | |             | |   | | | |   |     | |
+ +-+-+ +-+-+-+ + + + +-+ +-+ +-+ +-+ +-+ + + + +-+ + +-+ +-+-+ +-+ + +-+-+ +
| |             | | |       | |     | |   | | |   | | | |   |     |   |     |
+-+ +-+ + + +-+ +-+-+ +-+ +-+-+ +-+-+-+-+ +-+ +-+-+ + + +-+-+-+ +-+ + + +-+ +
|   |   | | | |   |     |     |   | |     |   |     |   |         | | | |   |
+-+-+-+-+ +-+ + + +-+ +-+ + + + +-+ + + + +-+-+-+ + + + +-+-+ + + + +-+ + + +
|     | | |     | |   |   | | |   |   | | |       | | |     | | | | |   | | |
+ + + + +-+ +-+ +-+-+ + + + +-+-+ +-+ + +-+-+-+-+ + +-+ +-+-+ + + + +-+ + +-+
| | |       | |   |   | | |   |   |   | | |       |   | |     | | | |   |   |
+ + + +-+-+ + + +-+ + + +-+ +-+ +-+ +-+-+ + +-+-+ +-+-+ +-+ +-+-+ + + +-+ +-+
| | | |     |     | | | | |   | |   | |       |       |   | |     | | |     |
+-+-+ +-+-+ + + +-+-+ +-+ + +-+ +-+-+ +-+-+-+-+ + + + +-+-+-+ +-+ + +-+-+ +-+
| |   |     | | |       |   |     |             | | |     | | | | | |     | |
+ +-+ +-+-+ + +-+ + + +-+ +-+-+-+-+ + +-+ + +-+ + +-+ +-+-+ +-+ + + + + + + +
|   | | |   |   | | | |         | | | |   | |   | |             | | | | |   |
+-+ +-+ +-+-+ +-+-+ +-+ + + + +-+ + +-+-+-+ +-+ +-+-+-+ +-+ +-+ +-+-+ + + +-+
|       |         |   | | | | | |   |   |   | | |         | |       | | |   |
+-+ + +-+-+-+ +-+-+ +-+-+-+-+-+ +-+ +-+ +-+ + +-+ + +-+ + +-+-+-+-+-+ + +-+ +
|   |           |           |   |   |           | | |   |         |   | |   |
+-+-+-+ +-+ + +-+-+ + + +-+-+-+ +-+-+-+ +-+ + +-+ +-+-+-+ + +-+ + + + +-+ + +
|       |   |     | | | |               | | | |       |   |   | | | | | | | |
+ +-+-+ +-+-+ + +-+ +-+-+-+ + + + + +-+ + + +-+ +-+-+ + +-+-+ +-+-+ +-+ +-+-+
| | |       | |   |       | | | | | |   |   | |   | | |   |       |   | |   |
+-+ + + + + +-+ +-+ + +-+ + + + +-+ +-+ + + + +-+ + +-+ +-+ + + + +-+-+ + +-+
| |   | | |   |   | | |   | | |   | |   | |     |     |   | | | |           |
+ +-+ + +-+-+ + +-+ + +-+-+ +-+-+-+-+-+-+ +-+-+-+ + + + + +-+ + + +-+ + + +-+
|     |     | |   | | |       |           | |     | | | |   | | |   | | |   |
+-+ +-+ +-+ +-+-+ +-+ + + +-+-+-+-+ +-+ +-+ + + +-+ +-+ + + +-+-+ + + + +-+-+
|   |     |   |   | | | |   |         |     | |   | |   | |   |   | | |     |
+ +-+ +-+-+ +-+-+ + + +-+-+ + + + + +-+ + + +-+ + +-+ + + + + + +-+ + + + +-+
| |     |     |     |   |   | | | | |   | |   | | |   | | | | | |   | | |   |
+-+-+ + +-+ +-+ + +-+-+-+ + + +-+ +-+ +-+ + + + +-+ +-+ + + +-+-+ +-+-+ + +-+
|     | |     | | | |   | | | |   |   |   | | | |   |   | |   |   | |   |   |
+ +-+-+ +-+ + +-+ + + + + +-+-+-+ +-+-+ +-+-+-+-+-+ +-+-+ +-+-+ + + +-+ + + +
| |     |   | |     | | | |     | |           |       |     | | |     | | | |
+ +-+ +-+-+ +-+-+ +-+ + +-+ +-+ + + +-+-+-+ +-+-+-+ +-+ + +-+ + +-+ + +-+ + +
| |       |   |       | | | |   | | |           |   |   |     |   | |   | | |
+-+ + + +-+ +-+-+ +-+-+ + + +-+ +-+-+ +-+ +-+ +-+-+-+ +-+ + + +-+-+-+-+-+-+ +
|   | | |   |         |   | |         |     |     |   |   | |   | |       | |
+-+ +-+ +-+ +-+ + + +-+ +-+-+-+-+ + +-+ + + + + +-+-+ +-+ + + +-+ +-+ +-+ +-+
|     |   | |   | |   |     |     |   | | | | |   |   |   | |           | | |
+ + + + +-+-+ + +-+ +-+-+-+-+ +-+ +-+-+-+-+ + + + + + + + + + +-+-+-+-+-+-+ +
  | | |     | | |         |   |           | | | | | | | | | |               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
------- test 10 ----
38 100
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           |         | | |       |             |       |   |
+ + + +-+-+-+-+ + +-+-+-+-+-+ + +-+-+ + + + +-+-+-+-+ +-+ + + +-+ +-+ +-+ + +
| | |     |     |                 |       |     | |       | | |   | |       |
+ +-+ + +-+ +-+ + +-+-+-+ +-+ + +-+ +-+-+ + +-+-+ + + +-+ +-+ + + + + +-+ + +
|     |       | |       |   | |   |                 |   |   |   | |     | | |
+ + + + + +-+ + +-+ +-+-+-+-+-+-+-+ + + +-+ +-+ + + +-+-+ +-+ +-+-+ +-+ +-+ +
| | |   |     |         |   |       |             |   | |     | | | | |   | |
+-+ + +-+ +-+-+ + +-+-+ + +-+ +-+-+ + +-+-+-+-+ +-+-+ + + +-+-+ + + + + +-+-+
|   |   |     |   |   |           | | | |     | |   |                 |     |
+ +-+ + +-+ +-+ + + +-+-+-+ + + +-+-+-+ + +-+ +-+ +-+ + +-+-+-+-+-+-+-+ +-+-+
| |   | |       |         | | |                     | | |   | |   | |       |
+ +-+ + +-+ + + +-+ + + + + + + +-+ +-+-+ + + + + + +-+-+ +-+ + + + + +-+-+-+
| |   |                 | | |     |       |   | |     | | |             |   |
+ + + +-+ + +-+ + + + + +-+-+ + + + +-+-+ + +-+ + +-+ + + + +-+ +-+-+ + + + +
| | |   | |   | | | | | |   | | | | | |       | |   |           | |       | |
+-+ + + +-+-+-+-+ +-+ + + +-+-+ +-+ + +-+-+-+ +-+ + + + + +-+ +-+ + +-+-+-+-+
|   |     |   |   |   |     | |   |       |     |     |           |   | |   |
+-+-+ +-+ + +-+-+ +-+-+-+ +-+ + + + + +-+ + +-+-+-+-+ + +-+-+ + +-+ + + + + +
|     |       | |   |         |   |     | |         | |   |     |   |       |
+ +-+ + + +-+ + + +-+-+ +-+ +-+ +-+-+ + +-+ +-+ + + + +-+-+ + + + + +-+-+ + +
| |   | |           |     | |       |         | | |         | |   |         |
+ + +-+ + +-+ +-+ +-+ + +-+ +-+-+ + +-+ +-+-+ + + + +-+ + + + +-+ +-+ +-+-+-+
| | |   |   |                         |     |   | |   | | |         |     | |
+-+ +-+ + +-+ + + +-+-+-+-+-+ +-+ +-+-+-+ + + +-+ + +-+ +-+ + +-+ +-+-+ +-+ +
|       | |   |     |       |   |     | | | |   |     |     |   | |   | | | |
+ + +-+ + +-+ +-+ +-+ +-+-+-+ +-+ + +-+ + + + + +-+ + +-+ +-+ + + +-+ +-+ + +
| |   |   |     |   | | | | | |   |         | | | | |   |   |               |
+-+ + +-+ +-+ + +-+ + + + + + + + + +-+ + + +-+-+ +-+ + + + + + + + +-+ + +-+
|   |   | |       |               |   | | |       |   |   | | | |           |
+ + +-+-+ + + + + + + +-+ +-+ +-+ +-+ +-+ + + + +-+-+ +-+ +-+ +-+ + +-+ +-+-+
|       | |     | | |   |       |   |   | | | |     |       | |             |
+ + +-+ + +-+ + + + +-+ +-+-+-+ + +-+ +-+-+ +-+-+ + + + +-+ + + + + + + + +-+
|         |     | |   |   |   | |   |     |     | | | |   |   | | |   | |   |
+-+ +-+-+-+-+ + +-+ +-+ +-+ + +-+-+-+ + +-+-+ + +-+-+-+-+-+ + +-+-+ +-+-+ +-+
|             |   |         |     | |       | | |       | | |       |       |
+ + + + +-+ + + + + + +-+ +-+-+-+ + + +-+ + + +-+ +-+ + + +-+-+ + +-+ + +-+ +
| | | |   | | | | |     | | |   |   |   |   | | |                   | |     |
+ + +-+-+-+-+ +-+-+ + +-+ + +-+ + +-+ +-+ +-+ + + +-+ +-+-+ + + + +-+-+ + + +
| |     | | |     | |   |       |   |   | | |     | | |     |   | |   | |   |
+-+ +-+ + + + +-+ + + + + +-+-+-+ + +-+-+ + + +-+ + + + + +-+ + + + +-+-+-+-+
      |         | | | | |       |           |   |                     | |   |
+ + +-+ + + + +-+-+-+ +-+ + + +-+-+ + +-+ +-+-+ +-+-+ +-+ +-+ + +-+ + + + +-+
|     |   | |       |   | | |     | |   | |   |                   |   |     |
+-+ +-+ +-+-+ +-+-+-+ + + + +-+-+ +-+ +-+ + + +-+ + + +-+-+ + + +-+-+-+ +-+-+
|     |   |         | | |       |   |       |   | |     |           |   |   |
+ + + + + + + + +-+-+ +-+ + +-+-+ +-+-+ + +-+-+ + + + +-+ + + + + +-+ + + +-+
| | | | | | | |           | |         | |     | | | |   | | |         |   | |
+ + +-+ + + +-+ + +-+ +-+-+ +-+ + +-+-+-+-+ +-+ + + + +-+-+-+ + +-+ +-+ +-+ +
|     | |   | | |   | |   |   |         | |   | | | |       | |     |       |
+ + +-+ +-+-+ +-+ +-+ + +-+ +-+ +-+ +-+-+ + + +-+ + +-+-+-+-+-+-+ + +-+ + + +
|   |     |               | | | |         | | | |             |   |   | | | |
+ +-+-+-+-+ +-+ +-+ + + + +-+ +-+ + + + +-+-+ + + + + + + +-+ +-+ + +-+ +-+-+
|         | |     | | | |       | | | | | |       | |       | | | | |   |   |
+-+ +-+ + + + + +-+ +-+-+ +-+-+ + + + + + + +-+ +-+ + + + +-+-+ + + +-+ + + +
|   | | | |   | |             | |     |       |     | | |   |         |     |
+ + + +-+-+ + + +-+-+ + + + +-+ +-+ + + + + +-+-+ + + + + + +-+-+ + +-+-+ + +
|         | | |     | | | | |     | | |     |   | | | |       |   |         |
+ +-+ + +-+-+ + +-+-+ + + + + + +-+-+-+ +-+ + +-+-+ +-+ + + +-+ +-+-+ + +-+ +
|   | | | |   |   | | | | |           | |       | | |   | |   |   | |     | |
+ + + + + + + + +-+ + +-+-+ +-+ + + + +-+-+ + + + +-+-+-+ + +-+ +-+ +-+-+-+ +
| | | |           |     |     | | | |   | | | |   |     |     |           | |
+ +-+ +-+-+-+ +-+ +-+ +-+-+-+ +-+-+ + +-+ + +-+-+-+ +-+ +-+ + + + + +-+-+-+-+
| |             |   |     |     |   | |             |       |               |
+ +-+ +-+ + + +-+ + + + + +-+ +-+-+-+-+ +-+ +-+-+ +-+ +-+ + + + + + +-+ +-+ +
| |     | | |   | | | | | |       | | |   |   |         | | | | |       | | |
+ +-+ + +-+ + +-+-+ + + +-+-+ + + + + + +-+ +-+-+ + + +-+-+-+ +-+-+ +-+-+ + +
|   |   |   | |       | |   | |       | |               | |       |         |
+ +-+ +-+ + +-+ + +-+ +-+ +-+-+ + + +-+-+ + +-+-+ + +-+-+ +-+ +-+ + + +-+ + +
| |     |       | |             | |     | |     | |             |   |   | | |
+ +-+ + + +-+ + +-+ + + + + + + +-+-+ +-+ + +-+-+-+ + + + + + +-+-+-+ + + + +
|   | |   |   |       | | | | |   | |   | |     |   |     |           | | | |
+ + +-+ + + +-+ + +-+ +-+-+-+ + +-+ +-+ +-+ + + + + + + + + +-+ +-+ + + +-+ +
| |   | |   |   | | |                 |   |   | |   | | | |       |   |   | |
+-+ +-+-+ +-+ + +-+ + + + +-+ +-+ + +-+ +-+ +-+ +-+ + +-+-+ + + + + +-+ +-+ +
| | |       | |         | |     | |     |     |     |     |   | | |   |   | |
+ + +-+-+-+-+-+ +-+ + +-+-+-+ + + + + +-+-+ +-+ +-+-+-+ +-+ +-+ + +-+-+ + + +
|       | |     |   |       |   | | | |       |       |   |   | |   |   | | |
+-+ + + + +-+ + + + +-+ + +-+ +-+-+ +-+ + +-+-+ + + + +-+-+ +-+ +-+ + + + + +
|   |         | | |   | |                   |     |           |     |     | |
+-+ +-+-+ + + + +-+ + +-+ + + +-+ + +-+ + + + + +-+ + + + +-+ +-+ + + + + + +
|     |   | | | |         |     | |   |     | |   | | | | |       | | | |   |
+ + +-+ +-+-+-+ +-+ + +-+-+-+ + + +-+-+ +-+ + +-+ + + +-+-+-+-+ +-+-+-+-+ +-+
| |                 |       |   |               | | |   | | |   | |   |     |
+ + + + + +-+ + + + + +-+-+ + +-+ + + + +-+ + +-+ + +-+ + + + +-+ + +-+ + + +
| | |   |     |   | |   |       | |   |   | | |   |   |                 |   |
+ + + +-+-+ + + +-+-+ + + + +-+-+ +-+-+-+-+-+ +-+-+-+ +-+-+ + +-+-+-+ + +-+ +
| |     |   | | |     | |       |   | |     |           |             |   | |
+ +-+-+-+-+-+ + +-+ +-+ + + +-+ +-+ + + + + + +-+ +-+ + + + +-+-+ +-+ + + + +
|     |   |       | |   | |               |           | |           | |     |
+ + +-+ +-+ +-+ +-+ + + +-+ +-+ +-+ +-+ +-+-+-+ + +-+ + + + +-+-+ +-+ + + +-+
| |     |     |   | | |         |         |     |   | | | |     | | | |   | |
+ +-+ + +-+ + + + +-+ + +-+ + +-+ +-+ + +-+-+-+ + + + + +-+-+ + +-+ + +-+ + +
|   | |   | |   | |       | | |     | |       | | |         | |     |   |   |
+ + + + +-+ +-+ +-+ +-+ +-+ + +-+ +-+ + +-+-+-+ + + +-+ + + +-+ +-+ +-+ + + +
| |   | |     |   |   |   |         | |         | |   | | | | |   |   | |   |
+ +-+ + +-+ +-+-+ +-+ + + + + +-+ +-+ + +-+ + + +-+ + +-+ +-+ + +-+ + +-+ + +
| |           |     | | |   | |     | |     | |   | | |       |   |   | | | |
+ + + +-+ +-+ +-+ +-+ +-+ + +-+ + +-+ +-+-+ + +-+ + +-+ +-+ +-+-+ + +-+ +-+ +
| | |   |   |   | |   |   | |   |         | | |   |   | |       | | |     | |
+ + + + +-+ + + + + + +-+ + + +-+ + + +-+ + + + +-+ + + + + + + +-+-+ + +-+ +
| |   | |   | |   | | |     | |         | | |     | |           |         | |
+-+ + + + + + + + +-+ +-+ +-+-+-+-+ + +-+-+ +-+ +-+ + + + +-+ +-+ +-+-+ +-+ +
|   | |   |       |   | |   | | | | |     | |   |   |   |         |   |   | |
+ +-+-+ +-+ + + +-+ +-+ + +-+ + + + + +-+-+ + + +-+-+ + +-+ + +-+-+ + + +-+ +
| |       | | | |                   |         |   |   |   | |             | |
+ +-+-+-+ +-+ +-+ + + + + +-+-+-+-+ + + +-+ +-+-+-+ +-+ +-+-+ +-+ + + +-+-+-+
|   | |     | |   | | |       |   | | |   |   |           | | |     |       |
+ + + +-+ + + +-+-+-+-+-+ +-+ + +-+-+ +-+-+-+-+ +-+ + + + + +-+ + + + + +-+ +
|       | | |               |   | |           |     | | | |   | |     |   | |
+ +-+ +-+ + +-+ +-+-+ + + +-+ + + + + + + +-+ + +-+ +-+ +-+-+ + + + +-+ + +-+
| |         |   |     | | |   |   | | | |   | | |     | |             |     |
+-+ + + +-+ +-+ + +-+ +-+ + + + +-+ +-+ +-+-+ +-+ + + + + +-+ + + + + +-+ + +
|     | |     | |   |   | | | |             |   | |     |   | | | | |   | | |
+-+ + + + + + +-+ + + +-+ +-+ + + + +-+-+ +-+-+-+-+ + + + + +-+ + + +-+ + + +
|   |   | | | |     |   |   | | | | |       | |       | | | |     |   | | | |
+-+ +-+ + +-+-+ + +-+-+-+ + + + + + +-+ + +-+ +-+-+-+-+ +-+ +-+-+ +-+-+ +-+-+
|     |     |     |       | | | | |     |   | |   |   | |   |       |     | |
+ + +-+-+ + + +-+-+ + +-+ +-+ +-+-+ + +-+-+-+ +-+ + +-+-+ +-+ +-+ + + + +-+ +
|     |   |     | | |     |   |         |   |               | |   | |       |
+ + + +-+ + + + + +-+ + + +-+ + + + + +-+ +-+ + +-+ + + + +-+-+ + + +-+ + +-+
|             |   |   | | |   |   | |             | | | | | |   | |   | |   |
+-+ + + + +-+ +-+ +-+-+ +-+-+ +-+ +-+-+ +-+-+ + +-+-+-+-+-+ +-+-+-+ +-+ +-+-+
|               | |       |   |             |                     |   | | | |
+ + + + + +-+ +-+-+-+ + +-+ + + + + + + + + + +-+-+ + +-+-+-+ + +-+ + + + + +
| | | | |   |   |     |   | | | |   | |                   | | |   |         |
+-+-+ + +-+ + + +-+ + + + +-+-+-+ +-+-+ + +-+ +-+ + + +-+ + +-+-+ +-+ +-+-+-+
|   | | |     |     |               |       |   | | |   |                   |
+-+ +-+ + + +-+ + +-+-+ +-+ + +-+ + +-+ + +-+ +-+ +-+ + + +-+-+ +-+-+ + +-+-+
|       | |                   |             |   |     | |     |     | |     |
+ + + +-+ + +-+ +-+ +-+-+ +-+ +-+ + + + + + +-+-+-+ + +-+ + +-+ + +-+ +-+ + +
| | | |       | |     |   |         |   |   |     |     | |   | |   |   |   |
+ + + + + + + +-+ + +-+ +-+ +-+-+ + +-+ + +-+ +-+ +-+-+ + +-+ +-+ +-+-+ +-+ +
| |   | | | | |   | |   |   |           |             | |   |   |     |   | |
+ + +-+ +-+ +-+-+ +-+-+ + + + +-+ + +-+ +-+ + + + +-+ + + +-+-+ + +-+ +-+-+-+
|       |     |     |   | | | |   |   |   |   | |   | | |     |     | | | | |
+ + +-+ +-+ +-+ + +-+-+-+ +-+ +-+-+ +-+-+ + +-+-+-+ +-+ + + +-+ + + + + + + +
| | |     |   | |           | |     |             |   |     |   | | |       |
+ +-+ + +-+ + +-+ +-+-+ + + +-+-+ + + +-+ + + +-+-+ +-+-+-+ + + + + +-+ +-+ +
|       |       | |   |   |       | |       | | | |         | | | |         |
+ +-+ +-+-+ + + + + + +-+ + +-+ + + +-+ + +-+ + + +-+-+-+ + + +-+-+ + + +-+ +
|       |   | | | | |       |       |                 |   | |     | | |   | |
+ +-+ + + +-+ +-+-+-+ +-+ + + + + + +-+-+-+ + + + + +-+ +-+-+ + +-+ + +-+-+ +
| |   |               |   | | | | |     |     | |         | | |   |       | |
+-+-+ +-+ + + +-+ + +-+ + +-+ +-+ + +-+-+ +-+ + +-+ + +-+-+ +-+ + +-+ +-+ + +
|       |           |   |   |       |       | | |   | |       |     |   | | |
+-+ + +-+ +-+ + + +-+-+ + + + + + +-+-+ + + + + + +-+ + + + + + +-+ +-+-+ + +
|   |       |   | |       | | | |       |     | |   | | | |     |           |
+-+ + +-+ +-+ +-+-+-+-+ + +-+-+-+ +-+-+-+ +-+ + + +-+-+ + + +-+ +-+ + + + +-+
|   | |           |     |   | |             | |         |     |   | | | |   |
+ + +-+ + +-+ + + +-+-+ + +-+ + + + + +-+-+-+-+ + +-+-+-+-+ + + + +-+-+-+-+ +
| |   | | |     | |     |         | |   |               |   |     |     |   |
+-+ + + +-+ + +-+-+ + + + +-+ +-+-+ + +-+ + +-+ +-+ +-+ + +-+ +-+ + + + +-+-+
|   |     | | |       | | | | |   | |       |         |     |   |   |       |
+-+ + + + +-+-+ +-+ +-+-+-+ + + +-+ +-+ +-+ + + +-+-+ +-+ +-+-+-+ +-+-+ + +-+
    | | |     | |                 |   | | |   |   |   | |             |   | |
+-+-+ +-+-+ +-+ +-+ + + + + + +-+ +-+-+ + + + +-+ + + + + + +-+-+ +-+-+ + + +
|       | |   | |     | | | | |   |         |   |   |     |   |       | |   |
+ + + + + +-+ + + +-+ + + + + + + + + + +-+ + +-+-+-+ + +-+ +-+ + +-+ + + + +
| |   |     | | | | | | | |   | | | |     | |           | |   | |   | | | | |
+ +-+ + + +-+ + +-+ +-+-+ + + +-+ +-+ + +-+ +-+ + + + + + + +-+-+ + + + + + +
| |   |         |         | | |   | |     | |   | |   |   |       | |     | |
+ + + + + +-+ + + + + +-+-+ + + + + +-+ +-+-+ + +-+ + + + + +-+ + + +-+ +-+ +
| | | | | |   | | | | | |   | | | |               | | | |       |     | |   |
+-+ +-+-+-+ +-+-+ +-+-+ + + +-+ + + + + + +-+-+ + + +-+ + + + +-+ + + +-+-+ +
|             |     |       |   |   |     |     | |   | |   |   | | |   |   |
+-+ + + + +-+-+-+ + +-+ +-+ +-+ +-+-+-+ +-+ +-+ + + + + + + +-+-+-+ +-+ +-+-+
|   | | |       | | | | |   |       |   |         |       |       |   |     |
+-+ + +-+-+-+ +-+ +-+ +-+ + + +-+ +-+ + + + +-+ +-+ +-+ + +-+-+ +-+-+-+ +-+ +
|   | |         | |       | |   |   |     | |     | |           | |   |     |
+ + +-+-+ +-+ +-+-+ + + + + + +-+ + + + + + +-+ +-+-+ +-+-+-+ +-+ + +-+-+ +-+
| |   |   |   |         |   |     | | | |   |               |       |   |   |
+-+-+ + + +-+-+ + +-+-+-+ +-+-+-+ +-+-+-+ +-+ +-+ +-+ + +-+ + +-+-+ + +-+ + +
|       | |               |     |         |   |   | | |   | |     |       | |
+-+ + + + + + + + +-+ +-+ + + + + + + + +-+-+ +-+-+ + +-+-+-+-+ + + + + + +-+
|   |     | | | | |           | | | |   | |     |               | |   |     |
+ +-+ + + +-+ + +-+-+ + + + +-+-+ +-+ + + +-+ +-+-+-+ + +-+ +-+ +-+-+ +-+ + +
|       | |   |   |   | | |         | | |       | | |     |   |   |   |   | |
+ + + +-+ +-+ + + +-+ +-+ + +-+-+ +-+ + + + +-+ + + + + +-+ + + +-+-+ + +-+-+
|   |   |   |   | |   |           |   |   |   | |     |   | |       |       |
+ + + + + +-+ +-+ +-+ + + + +-+-+ + +-+-+ + +-+ +-+ +-+ +-+ +-+ +-+-+ + + +-+
| | | |   |   |       | |             |   | |         |   |       | | | |   |
+-+-+-+-+ +-+ +-+ + + +-+ + + +-+ +-+ +-+ +-+ + + + +-+ + + + + +-+ +-+-+ +-+
|       |           |       |   |   |   | |   | | |   | |   |     |   |     |
+-+-+-+ +-+ +-+ + +-+ +-+ +-+ +-+ +-+ +-+-+-+ + + +-+ + + + +-+ +-+ + +-+ + +
|           |   |   | |     |   |   |     | | |     | | | |   |     |   | | |
+-+-+-+-+-+ +-+ + + + + + +-+ +-+ +-+ + + + +-+ + +-+-+ +-+-+ +-+ + +-+-+-+-+
| |         |   |       |       |   | |   |   |                 | |         |
+ +-+ + + +-+ + +-+ + + + +-+ +-+-+-+-+-+-+ + + + +-+ + +-+ + + + +-+-+ + + +
|     | | |   | |     |   |             |   |       |   |   |   |   |   | | |
+-+ + +-+-+ +-+-+-+ + +-+ + + + +-+-+ + + + + + + + +-+-+ + + + +-+ +-+-+ + +
|     |       |     |   | | | |       | | | |           | | | |   | |       |
+-+ +-+ + + +-+-+ + + +-+ + + +-+ +-+-+-+-+ + +-+ +-+-+ +-+ + +-+-+ + +-+-+-+
|       |       | | |     |     |     |   |   |                 |           |
+ +-+-+ + + +-+ + + + +-+-+ +-+-+-+ +-+ +-+ + + + + +-+ + + + +-+ +-+ + +-+ +
| |     | | | |   | |   |         |       | | | |     |     |     |   |     |
+ +-+ +-+ + + + + +-+-+ + +-+ + + + +-+ +-+-+-+-+ + +-+-+ + + +-+-+ + + +-+ +
| |   |   |         |         | | | |           | |   |   | |     | |     | |
+-+-+ + + + + +-+ + + + + + + + +-+-+-+ +-+-+ +-+-+ + + + +-+ + + +-+-+ +-+ +
|                     | |     |   |       |           | | |     |   |       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

 

你可能感兴趣的:(USACO section 2.4 Overfencing(dfs+bfs))