#include <iostream>
using namespace std;
#define STACKSIZE 100
#define EMPTY 65535
typedef struct Node
{
int data;
int prefix;
}Node;
int fix = -1;
int pt1 = -1, pt2 = -1, pt3 = -1;
void push(Node* S, int data, int type)
{
fix++;
S[fix].data = data;
if (type == 1)
{
S[fix].prefix = pt1;
pt1 = fix;
}
else if (type == 2)
{
S[fix].prefix = pt2;
pt2 = fix;
}
else
{
S[fix].prefix = pt3;
pt3 = fix;
}
}
int pop(Node* S, int type)
{
int re;
if (type ==......
阅读全文