1
#include <stdio.h>
#include <stdlib.h>
#define OK 1
#define ERROR 0
#define OVERFLOW -2
#define LISTINCREMENT 10
#define INFEASIBLE -1
#define STACK_INIT_SIZE 1000
#define STACKINCREMENT 10
typedef int SElemType;
typedef double Status;
typedef int ElemType;
typedef struct SqStack
{
SElemType *base;
SElemType *top;
int stacksize;
}SqStack;
Status InitStack(SqStack &S);
Status Push(SqStack &S,SElemType e);
Status Pop(SqStack &S,SElemType &e);
Status StackEmpty(SqStack S);
void DestroyStack(SqStack &S);
void convert(int a);
void main()
{
double m,j;
int n,e,r;
SqStack S,Q,P;