#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <io.h>
#define MAX 50
typedef struct node1{
int school; /*学校编号*/
int record; /*项目成绩*/
struct node1 *next;
}Schools;
typedef struct {
int item; /*项目编号*/
Schools *firstschool; /*链域指向链表中第一个结点*/
}ITEM;
typedef struct {
int z; /* 项目总数 */
ITEM a[MAX];
}ALLitems;
typedef struct node2 {
int item; /*该学校获奖的项目*/
int record; /*项目成绩*/
struct node2 *next; /*链域*/
}Items;
typedef struct {
int school; /*学校编号*/
int score; /*学校总分*/
int boys; /*男团体总分*/
int girls; /*女团体总分*/
Items *firstitem; /*链域指向链表中第一个获奖项目的结点*/
}SCHNode;
typedef struct {
int n; /* 学校总数 */
SCHNode b[MAX];
}ALLNode;
ALLitems *g1;
ALLNode *g2;
void funct1(ALLitems *g1,ALLNode *g2)
{
Schools *p1;
Items *p2;
int i,j,k,m,w,h,x;
p1=(Schools *)malloc(sizeof(Schools));
p2=(Items *)malloc(sizeof(Items));
if(!p1||!p2)
exit(1);
printf("\n ****** 输 入 各 个 项 目 信 息 ****** \n\n");
printf("输入男子项目总数 m:");
scanf("%d",&m);
if(m<0||m>20)
{
printf(" 输入有误,m 是 20 以内的整数,请重新输入:");
scanf("%d",&m);
}
printf("输入女子项目总数 w:");
scanf("%d",&w);
if(w<0||w>20)
{
printf("输入有误,w 是 20 以内的整数,请重新输入:");
scanf("%d",&w);