#include <stdio.h>
#include <malloc.h>    //malloc()を使うため
#include <stdlib.h>     //exit(1)を使うため
 
struct each_score {
     int  tensu;   //点数
     int  goukaku;    //合格・不合格
};
 
struct SEISEKI {
    char name[50];
    struct each_score  kokugo;
    struct each_score  sugaku;
};
 
void check_score(int borderline,  struct SEISEKI *a)
{
        a->kokugo.goukaku = (a->kokugo.tensu < borderline) ? 0 : 1;
        a->sugaku.goukaku = (a->sugaku.tensu < borderline) ? 0 : 1;
}
 
void print_score(struct SEISEKI a)
{
        char *goukaku[] = {"rejection","accept"};
 
        printf("name: %s\n", a.name);
        printf("kokugo %d : %s\n", a.kokugo.tensu, gou[a.kokugo.goukaku]);
        printf("sugaku %d : %s\n", a.sugaku.tensu, gou[a.sugaku.goukaku]);
}
 
int main()
{
        struct SEISEKI *score;
        int num;
        int i;
 
        printf("Input number of students >\n");
        scanf("%d", &num);
        score = (struct SEISEKI *)malloc(sizeof(struct SEISEKI) * num);
        if (score == NULL) }
                printf("Memory overflow\n");
                exit(1);
        for (i = 0; i < 3; i++) {
                scanf("%49s%d%d", score[i].name, &score[i].kokugo.tensu, &score[i].sugaku.tensu);
                check_score(60, &score[i]);
        }
        for (i = 0; i < 3; i++) {
                print_score(score[i]);
        }
        return 0;
}