Unexpected behaviour of the codechef platform ..

I am unable to understand why the solution http://www.codechef.com/viewsolution/5441298 gives the wrong answer while the solution http://www.codechef.com/viewsolution/5441293 gives the right answer … The two codes according to me are the same .

Did you check it line by line? Did you compare the scanf("%s", &temp[i][j]) line in both?

Yes … Each line is same … The two different ways of writing scanf does not make any difference …
And here is the solution with the scanf written in the same way as in the accepted solution http://www.codechef.com/viewsolution/5441323 but it also gives the wrong answer …

I meant in one code you are writing scanf(&temp[i][0]) another one you are writing scanf(&temp[i])

united states