#include"iostream"
using namespace std;
#define MaxSize 100
typedef char ElemType;
typedef struct{
ElemType data[MaxSize];
int top;
}SqStack;
void InitStack(SqStack &st){
st.top=-1;
}
void DestroyStack(SqStack st){
}
int Push(SqStack &st,ElemType x){
if(st.top==MaxSize-1)
return 0;
else{
st.top++;
st.data[st.top]=x;
return 1;
}
}
int Pop(SqStack &st,ElemType &x){
if(st.top==-1) return 0;
else{
x=st.data[st.top];
st.top--;
return 1;
}
}
int GetTop(SqStack st,ElemType &x){
if(st.top==-1)
using namespace std;
#define MaxSize 100
typedef char ElemType;
typedef struct{
ElemType data[MaxSize];
int top;
}SqStack;
void InitStack(SqStack &st){
st.top=-1;
}
void DestroyStack(SqStack st){
}
int Push(SqStack &st,ElemType x){
if(st.top==MaxSize-1)
return 0;
else{
st.top++;
st.data[st.top]=x;
return 1;
}
}
int Pop(SqStack &st,ElemType &x){
if(st.top==-1) return 0;
else{
x=st.data[st.top];
st.top--;
return 1;
}
}
int GetTop(SqStack st,ElemType &x){
if(st.top==-1)