ac

吴承凌  •  5个月前


include

include

using namespace std; int a[6][6],b[6],c[6],m,n; int main(){

for(int i=0;i<5;i++){
	for(int j=0;j<5;j++){
		cin>>a[i][j];
	}
}
cin>>m>>n;
for(int j=0;j<5;j++){
	b[j]=a[m-1][j];
	c[j]=a[n-1][j];
}
for(int j=0;j<5;j++){
	a[n-1][j]=b[j];
	a[m-1][j]=c[j];
}
for(int i=0;i<5;i++){
	for(int j=0;j<5;j++){
		cout<<a[i][j]<<" ";
	}
}
return 0;

}


评论:

请先登录,才能进行评论