#K38157. Count Unique Normalized Names

    ID: 26136 Type: Default 1000ms 256MiB

Count Unique Normalized Names

Count Unique Normalized Names

You are given a list of guest names. Your task is to determine the number of unique names after normalizing them. The normalization process involves:

  • Converting all letters to lowercase.
  • Removing any leading and trailing spaces.

For example, the names "John Doe", "john doe", and " JOHN DOE " are all considered the same after normalization.

Note: Names that are entirely spaces are considered as an empty string and should be counted accordingly.

inputFormat

The first line of input contains a single integer n representing the number of names.

The following n lines each contain a single name (which may include spaces).

outputFormat

Output a single integer representing the number of unique normalized names.

## sample
5
John Doe
john doe
 Jane Doe 
jane doe
JOHN DOE
2