Problem with the validation script


#1

@anshumansingh As seen in the screen-shot with the input as 2 result is correct however the code fails when submitting the answer.
Code is
vector Solution::getRow(int A)
{
vector<vector> an(A+1);
for(int i=0;i<A+1;i++)
{
vector temp(i+1);
if(i==0)
temp[0]=1;
else
{
for(int j=0;j<i+1;j++)
{
int a=0,b=0;
if(j-1>=0)
a=an[i-1][j-1];
if(j<=i)
b=an[i-1][j];
temp[j]=a+b;
}
}
an[i]=temp;
}
return an[A];
}

.