奇怪?
查看原帖
奇怪?
778802
Xssion37_XY楼主2023/1/17 19:43

测试感觉溢出了?还是没反应?

#include<iostream>
using namespace std;
int main(){
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int a_len;
	cin>>a_len;
	int a1,a2,gg[4];
	gg[1]=1,gg[2]=2,gg[3]=3;
	while(cin>>a1>>a2){
		swap(gg[a1],gg[a2]);
	}
	cout<<gg[a_len];
	//fclose(stdin);
	//fclose(stdout);
	return 0;
}
2023/1/17 19:43
加载中...