1、#include#includetypedef struct tagLNodeint data;struct tagLNode *next;LNode,*List;void CreateLinkR(List *L,int n);void TravelList(List L);List AcrossList(List j,List k);void DelateList(List *L,List *L1);void TravelList(List L);int main()int m,n,l;List a,b,c,d;scanf(“%d“,scanf(“%d“,scanf(“%d“,CreateL
2、inkR(CreateLinkR(CreateLinkR(d=AcrossList(b,c);DelateList(TravelList(a);return 0;void CreateLinkR(List *L,int n)List p,s;p=*L=(List)malloc(sizeof(LNode);for(;n0;n-)s=(List)malloc(sizeof(LNode);scanf(“%d“,p-next=s;p=s;p-next=NULL;List AcrossList(List j,List k)List p,q,head,z,s;head=z=(List)malloc(siz
3、eof(LNode);p=j-next;while(p)q=k-next;while(q)if(p-data=q-data)s=(List)malloc(sizeof(LNode);s-data=p-data;z-next=s;z=s;break;q=q-next;p=p-next;z-next=NULL;return head;void DelateList(List *L,List *L1)List p,q,p1,q1;p=*L;q=(*L)-next;while(q)p1=*L1;q1=(*L1)-next;while(q1)if(q-data=q1-data)p1-next=q1-next;free(q1);q1=p1-next;p-next=q-next;free(q);q=p;elsep1=p1-next;q1=q1-next;if(p=q) q=p-next;elseq=q-next;p=p-next;void TravelList(List L)List p=L-next;while(p!=NULL)printf(“%dn“,p-data);p=p-next;