# Not able to find the error in the code for CHEFWORD

Following is the link of my submission for CHEFWORD

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

1 Like

There is a very important line mentioned at the end of the problem statement. What is the probability that CHEFâ€™S string transforms to a â€śdistinctâ€ť string in the given list of strings. Your code doesnâ€™t check the given strings for uniqueness. Eg:- i give you aaa to be transformed into 4 stringsâ€¦ ccc, ccc, ccc, ccc. You code will check the probability for all 4 and add up. Although only 1 unique string, ccc, is present. So you just have to calculate it for one.

2 Likes

Thanks buddy, but the distinct part is not mentioned verbose.
Its just "probability that after exactly K claps Chefâ€™s word will equal one of the words from list? "
one from the list means uniqueness was a bit tough to understand

@amritkrs, yupp that was an edge case to identify. You are right, it isnâ€™t mentioned. Solved it quite a few days ago, so got confused. Anyway, thatâ€™s the problem.