From the problem description:mf wrote:And I'd like to ask, are there empty lines in the input? I use scanf(" %s",...) to read words, could this be a problem?
I think empty string should not be possible. Besides, I also used scanf("%s",...) and got AC.All words use only lowercase letters and contain between 1 and 1000 characters.
Hope it helps
