Quattro Cheese Pizza
Time limit1sMemory limit1024 MB
Check whether the toppings include at least four different ones whose names end with Cheese, counting case-sensitively.
- Level
Easy2 of 10
- Topics
- String, Hash map, Implementation
- Solved
- No attempts yet
Problem
Bihaengssi, who loves cheese and pizza, kept buying cheese pizza every day until his wallet ran empty. Realizing that making pizza at home costs less than buying it, Bihaengssi decided to bring various toppings and make his own pizza.
A quattro cheese pizza, as the name says, must have four different kinds of cheese as toppings. Bihaengssi has eaten countless cheese pizzas and knows that a topping whose name ends with Cheese is a cheese. Given the list of toppings Bihaengssi brought, determine whether some or all of them can be used to make a quattro cheese pizza.
Input
The first line contains the number of toppings, an integer from to .
The second line contains the list of toppings on a single line. Toppings are separated by spaces, and each consists of 1 to 100 English letters, uppercase or lowercase. Letter case matters.
Output
Print yummy if a quattro cheese pizza can be made from the given toppings, and sad if it cannot.