codechef is giving wrong answer but i am always getting correct answer.
link: https://www.codechef.com/viewsolution/11039081
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.