#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
typedef int ElemType;
typedef struct Qnode
{
int data;
struct Qnode *next;
} Qnode;
typedef struct
{
Qnode *front;
Qnode *rear;
} LQueue;
void Init_LQueue(LQueue &q)
{
q.front=q.rear=(Qnode *)malloc(sizeof(Qnode));
q.front->next=NULL;
}
void En_LQueue(LQueue &q,int x)
{
Qnode *p;
p=(Qnode *)malloc(sizeof(Qnode));
p->data=x;
p->next=NULL;
q.rear->next=p;
q.rear=p;
}