| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164231 | 杨金卓 | 矩阵行交换 | C++ | Accepted | 1 MS | 268 KB | 844 | 2026-11-01 14:12:51 |
#include<bits/stdc++.h> int a[5][5]; int b[2][5]; using namespace std; int main(){ int n,m; cin>>n>>m; n-=1; m-=1; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; } } for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ if(i==n){ cout<<a[m][j]<<" "; }else if(i==m){ cout<<a[n][j]<<" "; }else{ cout<<a[i][j]<<" "; } } cout<<endl; } /* for(int i=0;i<5;i++){ b[0][i]=a[n][i]; } for(int i=0;i<5;i++){ b[1][i]=a[m][i]; } for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ if(i==m){ a[i][j]==b[1][j]; } if(i==n){ a[i][j]==b[0][j]; } } } for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cout<<a[i][j]<<" "; } cout<<endl; } */ return 0; }