
#include<stdio.h>
#include<stdlib.h>
#define TRUE 1
#define FALSE 0
#define OK 1
#define ERROR 0
#define INFEASIBLE -1
#define OVERFLOW -2
typedef int Status;
typedef int ElemType;
struct LNode
{
ElemType data;
LNode *next;
};
typedef LNode *LinkList;
Status equal(ElemType c1,ElemType c2)
{
if(c1==c2) return TRUE;
else return FALSE;
}
Status big(ElemType c1,ElemType c2)
{
if(c1>c2) return TRUE;
else return FALSE;
}
void print(ElemType c)
{
printf("%d ",c);
}
void InitList(LinkList &L)
{
L = (LinkList)malloc(sizeof(LNode));
if(!L)
exit(OVERFLOW);
L->next=NULL;
}
void DestroyList(LinkList &L)
{
LinkList q;
while(L)
{q=L->next;free(L);L=q;}
L=q;