#TheDress
Time limit1sMemory limit1024 MB
For each survey answer, checks whether it contains the word pair blue and black, white and gold, or neither, then prints the three population percentages.
- Level
Easy2 of 10
- Topics
- String, Implementation
- Solved
- No attempts yet
Problem
Time limit: 1000 ms. Memory limit: 1024 MB.
After landing on planet i1c5l, people noticed that the locals wear blue and black clothes quite often. Every local has at least one blue-and-black piece of clothing in their wardrobe. That alone is no surprise, but one detail is odd. The locals insist the colors are not blue and black. They say the colors are white and gold.
To tell a human from an alien, a simple test was made. At a wedding party, someone took a photo of the groom's mother in her blue-and-black dress. Some respondents were shown the photo and asked the color of the dress. If the answer contains <<blue>> and <<black>>, the respondent is from Earth. If the answer contains <<white>> and <<gold>>, the respondent is from planet i1c5l. If the answer contains neither pair, the respondent is a creature from another planet.
You have the complete survey log from planet i1c5l. Determine the makeup of the planet's population based on the survey.
Input
The first line contains a single integer , the number of respondents (). The following lines contain the answers. No line is empty, and no line is longer than 100 characters. Each answer contains only lower-case Latin letters and spaces. No answer contains <<blue>>, <<black>>, <<white>>, and <<gold>> at the same time.
Output
Output three numbers, each on its own line.
The first number is the percentage of earthlings in the population.
The second number is the percentage of aboriginals.
The third number is the percentage of creatures from other planets.
Output all numbers with accuracy.