these are my two solutions for marblegf during december long challange.
http://www.codechef.com/viewsolution/3085218
http://www.codechef.com/viewsolution/3078607
look at both the solutions. the only difference is when i used getchar_unlocked() in taking an input for character in every test case, resulted me as a wrong answer. whereas when i changed it to cin it is accepted.
can anyone pls explain why does that happen. where does getchar() result wrong in taking a character.