#include<stdio.h>
#define MS 1000
int mp[MS][MS];
int dir[8][2]={0,1,1,1,1,0,1,-1
,0,-1,-1,-1,-1,0,-1,1};
typedef struct Node{
int x;
int y;
int d;
}DateType;
class Stack
{
DateType DT[MS];
int top;
public:
void iint()
{
top=-1;
}
void push(DateType dt)
{
DT[++top]=dt;
}
DateType pop()
{
top--;
return DT[top+1];
}
DateType front()
{
return DT[top];
}
int empty()
{
if(top==-1)
return 1;
else
return 0;
}
void print() <
#define MS 1000
int mp[MS][MS];
int dir[8][2]={0,1,1,1,1,0,1,-1
,0,-1,-1,-1,-1,0,-1,1};
typedef struct Node{
int x;
int y;
int d;
}DateType;
class Stack
{
DateType DT[MS];
int top;
public:
void iint()
{
top=-1;
}
void push(DateType dt)
{
DT[++top]=dt;
}
DateType pop()
{
top--;
return DT[top+1];
}
DateType front()
{
return DT[top];
}
int empty()
{
if(top==-1)
return 1;
else
return 0;
}
void print() <