Run ID:83395

提交时间:2024-07-14 14:44:16

#include<bits/stdc++.h> using namespace std; int a[5][5]; int b[5][5]; int main(){ int n,m; cin>>n>>m; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; b[i][j]=a[i][j]; } } for(int j=0;j<5;j++){ b[n-1][j]=a[m-1][j]; b[m-1][j]=a[n-1][j]; } for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cout<<b[i][j]<<' '; } cout<<endl; } return 0; }