my code is always printing NO in all cases,please help
problem link= CodeChef: Practical coding for everyone
code link = CodeChef: Practical coding for everyone
my code is always printing NO in all cases,please help
problem link= CodeChef: Practical coding for everyone
code link = CodeChef: Practical coding for everyone
Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile!
done sir
I can tell you why you are getting SIEGSEV error.
for(int j = 1;j<a.size()-1;j++)
should instead be
for(int j=1 ;j<a.size()-2;j++)
Again, I am not commenting on the logic, I am just telling you why your code could be giving SIEGSEV error.