codechef is giving wrong answer but i am always getting correct answer.
link: CodeChef: Practical coding for everyone
use less than or equal to & greater than or equal to sign (<=, >=).
if not works see this solution
You forgot to put <<endl after cout<<c[i](line 22). That is why it is giving WA.