呃……酱紫的c++程序为什么会Compile Error呢?
#include<bits/stdc++.h>
using namespace std;
long long doing,x,y,q,a[100005],next[100005],tess[100005];
/*char
string*/
int main()
{
scanf("%lld",&q);
a[1]=1;
next[1]=0;
tess[1]=1;
int t=1;
for(int i=1;i<=q;i++){
scanf("%lld%lld",&doing,&x);
if(doing==1){
scanf("%lld",&y);
a[++t]=y;
tess[y]=t;
next[tess[y]]=next[tess[x]];
next[tess[x]]=tess[y];
}
if(doing==2)
printf("%lld\n",a[next[tess[x]]]);
if(doing==3){
next[tess[x]]=next[tess[y]];
next[tess[y]]=0;
}
}
return 0;
}