Unique names
When creating a classroom, teachers want to have as many unique names as possible to avoid confusion. They ask you to write a program that would tell them how many unique names are there in a classroom each time a new student is added to the group. The final classroom consists of 5 people. So, the program gets 5 names in the input. Your task is to print the number of unique names after reading each new name.
Input | Output |
Anna
Bob
Simon
John
Anna | 1
2
3
4
4 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB