#K75287. Available Assignment Categories

    ID: 34386 Type: Default 1000ms 256MiB

Available Assignment Categories

Available Assignment Categories

You are given a fixed set of categories:

  • Physics
  • Chemistry
  • Biology
  • Computer Science
  • Engineering

Some of these categories might already have been assigned. Your task is to determine which categories are still available for assignment.

The input will start with an integer n representing the number of categories that have already been assigned. Then, n lines follow, each containing a category name (which may include spaces). You must output the count of available categories on the first line, followed by the list of available category names sorted in lexicographical order (one per line).

Recall that if you have a set difference \( S = T \setminus A \), the number of available elements is \(|S|\) and the available elements are those not contained in \( A \).

inputFormat

The input is read from stdin and consists of:

  • An integer n (0 \(\leq n \leq 5\)) on the first line, representing the number of assigned categories.
  • If \(n > 0\), the next \(n\) lines each contain a string representing an assigned category.

outputFormat

Output to stdout should contain:

  • The first line contains an integer representing the number of available categories.
  • If there is at least one available category, the following lines list each available category (one per line) in lexicographical order.
## sample
3
Biology
Engineering
Physics
2

Chemistry Computer Science

</p>