#C14571. Meeting Scheduler System

    ID: 44235 Type: Default 1000ms 256MiB

Meeting Scheduler System

Meeting Scheduler System

Develop a meeting scheduling system that manages meetings by reading commands from standard input and printing results to standard output. The system is required to handle the following functionalities:

  • Schedule a new meeting
  • Update details of an existing meeting
  • Cancel a meeting
  • Send reminders to meeting participants

When scheduling or updating a meeting, the system must check the following conditions:

  • If a meeting with identifier \( id \) already exists, then the command should return Meeting ID already exists.
  • If a meeting does not exist when updating, canceling, or sending reminders, then the command should return Meeting ID does not exist.
  • Otherwise, the commands should return appropriate success messages.

Example:

Input:
5
SCHEDULE 1 10am Alice,Bob
SCHEDULE 1 11am Alice,Bob
UPDATE 1 11am
REMINDER 1
CANCEL 1

Output:
Meeting scheduled successfully.
Meeting ID already exists.
Meeting updated successfully.
Reminder sent successfully.
Meeting cancelled successfully.

Note: All commands are read from stdin and the results are printed to stdout, one per line.

inputFormat

The first line of input contains an integer \( T \) representing the number of commands. Each of the following \( T \) lines contains a command in one of the following formats:

  • SCHEDULE meeting_id time_slot participants (participants are provided as a comma-separated list without spaces)
  • UPDATE meeting_id new_time_slot
  • CANCEL meeting_id
  • REMINDER meeting_id

outputFormat

For each command, output the corresponding result message on a new line. The messages can be one of the following:

  • Meeting scheduled successfully.
  • Meeting ID already exists.
  • Meeting updated successfully.
  • Meeting ID does not exist.
  • Meeting cancelled successfully.
  • Reminder sent successfully.
## sample
5
SCHEDULE 1 10am Alice,Bob
SCHEDULE 1 11am Alice,Bob
UPDATE 1 11am
REMINDER 1
CANCEL 1
Meeting scheduled successfully.

Meeting ID already exists. Meeting updated successfully. Reminder sent successfully. Meeting cancelled successfully.

</p>