Why my code is having Partially Correct answer


#1

why my code on submissin is giving partial score ,and saying that answer does not match

vector Solution::getRow(int A) {
if(A<0)
return {};

vector<int> v;
 v.push_back(1);
 if(A==0)
 return v;
int fact[A+1];
fact[0]=1;
int i,j;
for(i=1;i<=A;i++)
    fact[i]=i*fact[i-1];
    
   
    for(j=1;j<=A-1;j++)
    v.push_back(fact[A]/(fact[j]*fact[A-j]));
    v.push_back(1);
    return v;

}