here are my two submissions and their result:
https://www.codechef.com/viewsolution/1130851100
https://www.codechef.com/viewsolution/1130850996
the only difference is taking input of string in different lines. both are correct for single test cases but fails when multiple test cases are taken at same time?
please explain why this is happening.
when n is odd you are skipping taking input string of that test case , so in next iteration or next test case when you will cin>>n it will try to take string of previous test case so n will remain 0 and all furthur testcases n will be 0 and all furthur string will be empty…Try with all even n it will run perfectly and the point n is odd after that all case will fail
1 Like
yeh it right.i did yesterday well