|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|2 초||256 MB||11||7||6||60.000%|
Every year, students across the world participate in the ACM ICPC. In order to participate in this contest, a student must be eligible to compete. In this problem, you will be given information about students and you will write a program to determine their eligibility to participate in the ICPC.
We will start by assuming that each student meets the “Basic Requirements” as specified in the ICPC rules—the student is willing to compete at the World Finals, is a registered student with at least half-time load, competes for only one institution in a contest year, and has not competed in two world finals or five regional contests.
The rules to decide if a student is eligible to compete in the contest year 2014–2015 are as follows:
For “equivalent of 8 semesters of full-time study,” we consider each semester of full-time study to be equivalent to a student completing 5 courses. Thus, a student who has completed 41 courses or more is considered to have more than 8 semesters of full-time study.
The input consists of a number of cases. The first line contains a positive integer, indicating the number of cases to follow. Each of the cases is specified in one line in the following format
name YYYY/MM/DD YYYY/MM/DD courses
where name is the name of the student (up to 30 alphabetic characters), the first date given is the date the student first began post-secondary studies, and the second date given is the student’s date of birth. All dates are given in the format above with 4-digit year and 2-digit month and day. courses is a non-negative integer indicating the number of courses that the student has completed.
There are at most 1 000 cases.
For each line of output, print the student’s name, followed by a space, followed by one of the strings eligible, ineligible, and coach petitions as appropriate.
3 EligibleContestant 2013/09/01 1995/03/12 10 IneligibleContestant 2009/09/01 1990/12/12 50 PetitionContestant 2009/09/01 1990/12/12 35
EligibleContestant eligible IneligibleContestant ineligible PetitionContestant coach petitions