Custom input shows correct answer and submission shows wong answer


#1

for custom input my code shows correct answer but when testing is done,it shows run time error on same input
how can i handle it


#2

I am also having the same issue. Do you get the solution?


#3

I was having the same problem … I corrected my base condition from
if(A.size() == 0) return A;
to if(A.size() < 2) return A; it worked for me.


#4

I also faced the same issue. If same compilor is used for custom and submition why, the error.