LUCKYSTR - Editorial

PROBLEM LINKS

Practice
Contest

DIFFICULTY

EASY

EXPLANATION

This is the easiest problem of the set. If the length of the current string Bi is greater than or equal to 47, just print Good. In other case, iterate through all of the K favorite strings of the Little Elephant and check whether Bi is its substring using definition from the problem statement or using some built-in function of your programming language, for example, in C/C++ you can use magic function strstr(char * pattern, char * text) that do all the job (see tester solution as a reference). If Bi is appeared to be a substring of some favorite string, print Good, otherwise print Bad.

SETTER’S SOLUTION

Can be found here.

TESTER’S SOLUTION

Can be found here.

http://www.codechef.com/viewsolution/3306252

gettin wa…any special case i am missing??

why is length of string being taken 50+1 ???

//