| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 37781 | jiabokai | 矩阵交换行 | C++ | Accepted | 1 MS | 244 KB | 449 | 2024-01-23 10:31:40 |
#include<bits/stdc++.h> using namespace std; int main() { int a[6][6]={}; int m,n; for(int row=1;row<=5;row++){ for(int col=1;col<=5;col++){ cin>>a[row][col]; } } cin>>m>>n; for(int col=1;col<=5;col++){ a[0][col]=a[m][col]; a[m][col]=a[n][col]; a[n][col]=a[0][col]; } for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }