#P15917. [TOPC 2023] Advance to Taoyuan Regional

[TOPC 2023] Advance to Taoyuan Regional

题目描述

In the last cycle, the domestic team selection process of ICPC Taoyuan Regional Contest chooses teams from preliminary contests according to the following categories.

  • Category 11: Among the teams that participated in the “ICPC Taiwan Online Programming Contest” (TOPC) and solved one problem, the best team from each university will be selected. This category is limited to 3030 teams.
  • Category 22: The top 4040 teams in the “National Collegiate Programming Contest” will be selected.
  • Category 33: “Taiwan Private University Programming Contest” qualifies 1010 best teams, but no more than two teams per university.
  • Category 44: “Taiwan Technology University Programming Contest” qualifies 1010 best teams, but no more than two teams per university.
  • Category 55: 1010 teams will be qualified for their CPE performance, but no more than one team from each university. Such teams must participate in TOPC and solve at least one problem.
  • Category 66: If a team of the above five categories resigns for any reason and there are other teams from the same university participating in TOPC. The replacement of the resigning team will be selected from the TOPC participants from the same university according to their performance.
  • Category 77: If the total number of teams in the above six categories is less than 100100, the organizer will invite the top teams of TOPC to participate in the regional contest. The invited teams must be in the top half of the final standings.
  • Category 88: Free to participate, priority will be given to universities not selected in the above categories and will be ranked according to the order of registration.

The domestic team selection rule of ICPC Taoyuan Regional Contest has a major change in the 2023-2024 cycle. The organizer added a note, “If the list of selected teams cannot be submitted 3535 days prior to the ICPC Taoyuan Regional Contest, the category will be subject to suspension for that particular year.” This change was made to deal with the fact that some preliminaries were held too late. Typically, it takes about five weeks to complete the logistic operations of an ICPC regional contest. Therefore, all preliminaries were held before the end of October, and the regional contests were held in November in the past few years.

The 2023 ICPC Taoyuan Regional Contest will be held from October 2121 to October 2323, 20232023. Consequently, some categories will be suspended if the corresponding preliminaries are still held in late September or October as usual. As the director of TOPC, you must be wise enough to choose a proper date to hold TOPC. If the categories related to TOPC are suspended, there will be much less domestic teams competing in the 2023 ICPC Taoyuan Regional Contest. A contest date is too late for TOPC if it is not at least 3535 days prior to October 2121, 20232023. Please write a program to determine whether a tentative contest date is too late for TOPC.

输入格式

The input contains a string in ISO 86018601 format YYYY-MM-DD indicating the tentative contest date for TOPC. YYYYYYYY, MMMM, DDDD are the year, the month, the day of the tentative contest date for TOPC, respectively.

输出格式

If the tentative contest date is too late, output “TOO LATE” without quotes. Otherwise, output “GOOD” without quote.

2023-09-16
GOOD
2023-10-01
TOO LATE

提示

  • YYYYYYYY is 20232023.
  • MMMM is from 11 to 1212.
  • DDDD is from 11 to 2828.