All problems

Faceted Trend Lines With relplot(kind='line')

hardPythonSeabornrelplot

Halden Cycle Hire has grown into several regions, and stacking every region on one chart has made it unreadable. The new report gives each region its own small panel, laid out in a row. Before the layout can be sized, the report builder has to know how many panels it is about to produce.

Task: Print how many different regions appear in the upload.

Input

The first line holds one integer n, the number of readings, where 1 <= n <= 1000. Then come n lines, each holding a region name, a day number and a value, separated by single spaces. Region names contain no spaces, and a region reports on as many days as it likes.

Output

One line holding a whole number: how many distinct region names there are. A region that filed twenty readings still gets one panel, and counts once.

Example:

Input:
4
East 1 10
West 1 20
East 2 15
North 1 5

Output:
3

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…