0分qz
  • 板块题目总版
  • 楼主AlexanderQ
  • 当前回复0
  • 已保存回复0
  • 发布时间2025/1/15 21:49
  • 上次更新2025/1/16 11:09:40
查看原帖
0分qz
1282396
AlexanderQ楼主2025/1/15 21:49
#include<bits/stdc++.h>
using namespace std;
int ll[10005];
int main(){
	int type;
	int q;
	cin>>q;
	ll[0]=1;
	int x,y;
	int tr;
	for(int i=0;i<q;++i){
		cin>>type;		
		if(type==1){
			cin>>x>>y;
			tr=ll[x];
			ll[y]=tr;
			ll[x]=y;
		}
		if(type==2){
			cin>>x;
			cout<<ll[x];
		}
		if(type==3){
			cin>>x;
			ll[x]=ll[ll[x]];
		}
	}
	return 0;
}

WA+RE 0分 求助

2025/1/15 21:49
加载中...