Kolobok
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian.
Probably, each of us can remember wonderful evenings when one of the adults would sit by the fireplace and start reading fascinating bedtime fairy tales to the children. Without them, childhood would be somehow different, somehow poor and black-and-white. Thanks to them, kids developed their imagination, formed a sense of good and justice in themselves, became more polite and obedient. So let’s plunge into the magical world of fairy-tale childhood…
One wonderful winter evening, Kolobok, stepping out of his den, scratching his back and looking at the snowy forest with his round eyes, decided to organize an evening walk through the forest for himself. Walking along the path and bouncing, he cheerfully hummed his song and cheered up all the neighbors.
Despite the fact that the song was very cheerful, for some reason Kolobok found it somewhat not very diverse, somehow not saturated with words. Therefore, he became interested in how many different words occur in his song.
You are given the song that Kolobok was humming to himself. It is necessary to find the number of different words that occur in it.
Words in the song are separated by spaces. Two words are considered
identical if they consist of the same number of letters and the
corresponding letters are the same. Upper and lower case corresponding
letters are considered the same, that is, the word Aba is
equal to the word aBa.
Input
A single line consisting only of uppercase and lowercase Latin letters and spaces — Kolobok’s song.
Output
In a single line, output an integer — the number of different words in the song.
Constraints
The length of the string does not exceed \(10^3\) characters.
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| Tra la tra la tra la la bum BUM Uraaaaaaa | 4 |
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|