INTEST problem:Clarifications Needed

I have 2 questions related to the Enormous Input Test(INTEST) problem(Practice Easy).

First: Here are two codes that I have:
http://www.codechef.com/viewsolution/3056713 was accepted as correct
and http://www.codechef.com/viewsolution/3052733 was given WA
My question is that in the latter code I got WA for using getchar_unlocked(), while when I replaced it with fread(…) in the 1st one, I got correct answer and I couldn’t understand why?

Second: The solution http://www.codechef.com/viewsolution/1262617 ran in .31 and the sol http://www.codechef.com/viewsolution/3052733 ran in 8.41, but both are very similar and so why is there such a diff in runtime?