STONES - WA

Hi…I have been getting WA for the STONES problem even though the mentioned test cases and some of my own are passing. Can somebody please have a look and see if I have missed any boundary condition or something else ?? http://www.codechef.com/viewsolution/3844978

3 Likes

Your code seems to be ok, try to replace

printf("\n%d",ctr);    

with

printf("%d\n",ctr);

I tried the same but still says WA.

Have a look at THIS. You made a minor mistake in your memset function, you are initializing “h” and “H” using sizeof(char)*26 but it is int type and ypu should use sizeof(int)*26.

1 Like

Strange, this is working, but there is not a big difference - http://www.codechef.com/viewsolution/3849038

good eyes, I overlooked that…

awesome catch…Thanks roman28