#K87987. Maximum Unique Bug Types

    ID: 37208 Type: Default 1000ms 256MiB

Maximum Unique Bug Types

Maximum Unique Bug Types

You are given a set of bug reports. Each report contains an identifier, a bug type, and a severity level. If multiple reports share the same bug type, only the report with the highest severity is considered. Your task is to count the number of distinct bug types from the reports.

The problem can be formalized as follows:

Given a list of bug reports, let \(T = \{ type_1, type_2, \dots, type_k \}\) denote the set of all distinct bug types, then the answer is \(|T|\). This is represented by the formula:
$$max\_unique = |\{ bug\_type_i \}|$$

Note: The input should be read from stdin and the output should be written to stdout.

inputFormat

The first line of input contains a single integer (n), the number of bug reports. Each of the following (n) lines contains three space-separated values: an identifier (string), a bug type (string), and a severity (integer).

outputFormat

Print a single integer representing the maximum number of unique bug types.## sample

1
B001 UI 10
1