摘要:
#include using namespace std;#define MAXSIZE 256typedef struct stack{ int top; int stack[MAXSIZE];}Stack;void initStack(Stack *s){ s->top=0;}void push(Stack *s,int elem){ if(s->top>MAXSIZE) couttop++; s->stack[s->top]=elem;}void pop(Stack *s){ if(s->toptop--;}int max(Stac... 阅读全文