A. Kick Start

Codeforces
IDCF10243A
Time1000ms
Memory256MB
Difficulty
English · Original
Formal · Original
Kick Start is a global online coding competition brought by Google. Participants can compete in online rounds held throughout the entire year, and will have the opportunity to develop and grow their programming abilities while getting a glimpse into the technical skills needed for a career at Google. Mr. Panda is a Kick Start enthusiast who doesn't miss any Kick Start round of any year. He is now reading the 2019 schedule of rounds and wonders what's the date of the next Kick Start round (*excluding today*). Can you help Mr. Panda determine that date? Any given date in this problem will be in the format of a month abbreviation followed by a date ordinal number. Recall that month abbreviations are 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sept', 'Oct', 'Nov', and 'Dec'; and ordinal numbers are '1st', '2nd', '3rd', '4th', '5th', etc. The first line of the input gives the number of test cases, $T$ ($1 <= T <= 100$). $T$ test cases follow. For each test case, the first line contains an integer $n$ ($1 <= n <= 20$), the number of scheduled Kick Start rounds for this year. In the next $n$ lines, each line contains a date in the year 2019, in the format of a month abbreviation followed by a date ordinal number. Note that scheduled dates may *not* be arranged in chronological order, and all scheduled dates are distinct. The last line contains the date of today, also in the format of a month abbreviation followed by a date ordinal number. For each test case, output one line containing "_Case #x: y_", where _x_ is the test case number (starting from $1$), and _y_ is the date of the next Kick Start round or "See you next year" (quotes for clarity) if there is no following Kick Start round of this year. ## Input The first line of the input gives the number of test cases, $T$ ($1 <= T <= 100$). $T$ test cases follow.For each test case, the first line contains an integer $n$ ($1 <= n <= 20$), the number of scheduled Kick Start rounds for this year.In the next $n$ lines, each line contains a date in the year 2019, in the format of a month abbreviation followed by a date ordinal number. Note that scheduled dates may *not* be arranged in chronological order, and all scheduled dates are distinct.The last line contains the date of today, also in the format of a month abbreviation followed by a date ordinal number. ## Output For each test case, output one line containing "_Case #x: y_", where _x_ is the test case number (starting from $1$), and _y_ is the date of the next Kick Start round or "See you next year" (quotes for clarity) if there is no following Kick Start round of this year. [samples]
**Definitions** Let $ T \in \mathbb{Z} $ be the number of test cases. For each test case $ k \in \{1, \dots, T\} $: - Let $ n_k \in \mathbb{Z} $ denote the number of scheduled Kick Start rounds. - Let $ S_k = \{ (m_i, d_i) \mid i \in \{1, \dots, n_k\} \} $ be the set of scheduled dates, where $ m_i \in \{ \text{Jan}, \text{Feb}, \dots, \text{Dec} \} $ is a month abbreviation and $ d_i \in \mathbb{Z}^+ $ is the day ordinal (e.g., 1 from "1st"). - Let $ D_{\text{today}} = (m_t, d_t) $ be today’s date. **Constraints** 1. $ 1 \le T \le 100 $ 2. For each test case $ k $: - $ 1 \le n_k \le 20 $ - All dates in $ S_k $ are distinct and lie in the year 2019. - Month abbreviations are from the fixed set: $ \{ \text{Jan}, \text{Feb}, \text{Mar}, \text{Apr}, \text{May}, \text{Jun}, \text{Jul}, \text{Aug}, \text{Sept}, \text{Oct}, \text{Nov}, \text{Dec} \} $ - Day ordinals correspond to valid days in 2019 (e.g., no Feb 30). **Objective** For each test case $ k $: - Find the smallest date $ (m, d) \in S_k $ such that $ (m, d) > (m_t, d_t) $ in chronological order (within 2019). - If no such date exists, output "See you next year". - Otherwise, output the date in the same input format: month abbreviation + ordinal (e.g., "May 5th").
API Response (JSON)
{
  "problem": {
    "name": "A. Kick Start",
    "description": {
      "content": "Kick Start is a global online coding competition brought by Google. Participants can compete in online rounds held throughout the entire year, and will have the opportunity to develop and grow their p",
      "description_type": "Markdown"
    },
    "platform": "Codeforces",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "CF10243A"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Kick Start is a global online coding competition brought by Google. Participants can compete in online rounds held throughout the entire year, and will have the opportunity to develop and grow their p...",
      "is_translate": false,
      "language": "English"
    },
    {
      "statement_type": "Markdown",
      "content": "**Definitions**  \nLet $ T \\in \\mathbb{Z} $ be the number of test cases.  \nFor each test case $ k \\in \\{1, \\dots, T\\} $:  \n- Let $ n_k \\in \\mathbb{Z} $ denote the number of scheduled Kick Start rounds....",
      "is_translate": false,
      "language": "Formal"
    }
  ]
}
Full JSON Raw Segments