Computer Science, asked by musicdirectorrahul, 2 months ago

Input Format
It should contain all the words separated by space.

Output Format
Output the number of distinct words from the input
Output the number of occurrences for each distinct word according to their appearance in the input.
Both the outputs should be separated by space.

Sample Input
bcdef abcdefg bcde bcdef

Sample Output
3 211

Explanation
There are distinct words. Here, "bcdef" appears twice in the input at the first and last positions. The other words appear once each. The order of the first appearances are "bcdef", "abcdefg" and "bcde" which corresponds to the output.

Answers

Answered by Anonymous
1

Answer:

Sulfuric acid is sometimes referred to as the “king of chemicals” because it is produced worldwide in such large quantities. In fact, per capita use of sulfuric acid has been taken as one index of the technical development of a country. Annual production in the United States, which is the world’s leading producer, is well over 39 billion kg (86 billion pounds). It is the cheapest bulk acid.

Similar questions