#P3370. Count Unique Strings

    ID: 16627 Type: Default 1000ms 256MiB

Count Unique Strings

Count Unique Strings

You are given an integer N and N strings. The i-th string has a length of $M_i$ and may contain digits, uppercase letters, and lowercase letters. Note that the strings are case-sensitive. Your task is to determine how many distinct strings appear in the input.

Tip: If you really want to get good practice with hashing, dive in!

inputFormat

The input starts with a single integer NN (1N105)(1 \leq N \leq 10^5) on the first line. Each of the following NN lines contains one string comprised of digits and letters. The string provided in the ii-th line has a length of MiM_i.

outputFormat

Output a single integer, which is the number of distinct strings among the provided NN strings.

sample

3
abc
abc
ABC
2