这是一串编译错误的代码↓
#include<bits/stdc++.h>
using namespace std;
const int maxn=1005;
int a[maxn];
int main()
{
stack<int> sta;
int n,cnt,stanum=0;
cin>>n;
int t,lj;
for(int i=0;i<n;i++)
{
cin>>t;
memset(a,0,sizeof(a));
for(int j=0;j<t;j++)
{
cin>>a[j];
}
for(int j=t-1;j>=0;j--)
{
stanum=0;
cnt=0;
if(j==t-1)
{
sta.push(a[j]);
continue;
}
for(int k=j+1;k<t;k++)
{
if(a[j]==a[k])
{
cnt++;
break;
}
}
if(cnt==0)
{
sta.push(a[j]);
}
stanum=sta.size();
for(int j=0;j<stanum;j++)
{
cout<<sta[j]<<" ";
}
while(!sta.empty())
{
sta.pop();
}
}
}
}
错误提示在第43行
有没有大佬能帮我解决咩