#K13701. Yummy Recipe Checker
Yummy Recipe Checker
Yummy Recipe Checker
You are given a list of strings representing recipes. A recipe is considered yummy if it contains the substring chef at least once. Your task is to determine whether each given recipe is yummy or not.
For each recipe, print YES
if it is yummy and NO
otherwise.
Note: A recipe is defined as yummy if the substring chef
appears anywhere within the string. The search is case-sensitive.
inputFormat
The input is given from stdin and consists of the following:
- An integer
N
on the first line (1 ≤ N ≤ 105) representing the number of recipes. - Followed by
N
lines, each containing a non-empty string representing a recipe.
outputFormat
For each recipe, output a single line containing YES
if the recipe is yummy and NO
otherwise. The output should be written to stdout.
3
chefisgreat
ilovechefcooking
chef
YES
YES
YES
</p>