All problems

Faceted Regression With lmplot

mediumPythonSeabornlmplot

Calder Engineering tests several materials on the same rig, and one line fitted through all of them together would describe none of them. The report therefore fits a separate line per material, each drawn in its own colour. Before the figure is built, the legend and the colour set have to be sized against the number of lines.

Task: Print how many separate lines will be fitted.

Input

The first line holds one integer n, the number of readings, where 1 <= n <= 1000. Then come n lines, each holding a material name, an x and a y, separated by single spaces. Material names contain no spaces, and a material may be read any number of times.

Output

One line holding a whole number: how many distinct material names appear. One line is fitted per material, so a material read twenty times still counts once.

Example:

Input:
4
A 1 2
A 2 4
B 1 10
B 2 8

Output:
2

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…