WA in Impressing Chefina (CHFIMPRS )

https://www.codechef.com/viewsolution/33313648

This is my code for the following problem can anybody explain me which test case i am missing.
please help me. your help matters!!!

https://www.codechef.com/COOK118B/problems/CHFIMPRS/

This check (n - o.size())%2!=0 in line 40 is wrong. You just need to check if o.size() is greater than n.
You may have to change the rest of the logic accordingly. But the case for -1 was only when o.size() is greater than n.

Hey, could you have a look at my solution too?

https://www.codechef.com/viewsolution/33316610

Thanks!

sir, after correcting line 40 i again shows WA. can you correct it

https://www.codechef.com/viewsolution/33318045