Run ID:77621
提交时间:2024-06-14 20:08:24
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int n,m,k=0,j=0,x=0,c=0; cin>>m>>n; int v[5][5]; int b[5]; for(k=0;k<5;k++){ for(j=0;j<5;j++) cin>>v[k][j];} for(x=0;x<5;x++) b[x]=v[n-1][x]; for(x=0;x<5;x++){ v[n-1][x]=v[m-1][x]; v[m-1][x]=b[x];} for(k=0;k<5;k++){ cout<<endl; for(j=0;j<5;j++) cout<<v[0][j]; cout<<" "<<v[k][j]; } return 0; }