In November long challenge contest there is a question “Let us construct palindrome”.I have solve it.and i got 35 points for subtask-1.In subtastk-2 the first four task getting wrong and last two task is correct .But in my other code first four were correct and last two were getting RE.
So can any one help me what will be the test cases for which i am getting wrong answer in first four task.I cannot paste the solution here because it is a running contest.I also want to know that if length of string is 2 then it will always give answer YES as string of length 1 is always palindrome ?.
thanks in advance.Please help me so that i can get 100 points.
I have gone through the problem and test case of subtask is not given.But constraints says that sum of length of string over all test cases won’t exceed 10^6.Here i would kike to know that if before the test cases completed,and if sum of length of string exceeds its limit then should i break the while loop or not???.please someone help me at this point


I’m also facing the same problem.


Hi nitya,
As per your description,if you read the question carefully,100 pts are waiting for you .I had the same problem,but i cleverly managed to get 100 pts. As the contest is live,i cannot comment further :slight_smile:


String of length 2 is a yes.


My initial solution was something like yours… Solved subtask1 and last two files of subtask 2. I got to know where I was going wrong. Just keep trying with different test cases. If you are going with a comparison of first and last elements approach, make it equally on both sides after deleting a character. That’s what I could say.

Yes string of length 2 will always give yes.

You need not worry about that constraint. It would never exceed that given limit.


string of length 2 will always give yes !


All i will say is if this is the case for u… u are just at the threshold of getting 100… look at both your solutions carefully… u will get to know what u r missing :slight_smile:
And u need not break the loop, the inputs are given such that it never crosses 10^6


@nitya follow what @vinayawsm has said you will get 100…!!!


will string of length 2 always give yes???


@vinayawsm what it means make eqauly on both sides…??


can any one give me a test case where my code may fail.please supply me a test case…thanks


finally got 100 points …after 25 submissons…