sigabrt error why do i get this error in my code?

do
{
vectorv1(n),v2(n);
if(n==1)
{
cin>>v1[0];
cout<<“ambiguous”<<endl;
}
else if(n==0)
{
break;
}
else
{

              for(int i=0;i<n;i++)
              {
                        cin>>v1[i];
              }
              for(int i=0;i<n;i++)
              {
                        v2[v1[i]-1]=i+1;
              }
              if(v1==v2)
              {
                        cout<<"ambiguous"<<endl;
              }
              else
              {
                        cout<<"not ambiguous"<<endl;
              }
              
                        
              }
              cin>>n;
    }while(n>0);

Please post your full, formatted code and link to the Problem you’re trying to solve (or link to your solution).

1 Like

sorry for just pasting the code I had found the problem and so thanks for replying and next time I’ll post like link format👍🏼