Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37226 | 奚晨瑞 | 矩阵交换行 | C++ | Wrong Answer | 1 MS | 248 KB | 455 | 2024-01-19 16:36:58 |
#include<iostream> using namespace std; int main() { int a[5][5]; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; } } int m,n; cin>>m>>n; for(int i=0;i<5;i++){ if(i==n+1){ for(int j=0;j<5;j++){ cout<<a[m][j]<<" "; } } else if(i==m+1){ for(int j=0;j<5;j++){ cout<<a[n][j]<<" "; } } else{ for(int j=0;j<5;j++){ cout<<a[i][j]<<" "; } } cout<<endl; } return 0; }