Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109254 | 邹昊辰 | 矩阵行交换 | C++ | Accepted | 1 MS | 272 KB | 378 | 2025-02-07 12:18:18 |
#include <bits/stdc++.h> using namespace std; int main() { int a[5][5]; int m,n,s; cin>>m>>n; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; } } for(int x=0;x<5;x++){ s=a[m-1][x]; a[m-1][x]=a[n-1][x]; a[n-1][x]=s; } for(int z=0;z<5;z++){ for(int h=0;h<5;h++){ cout<<a[z][h]<<" "; } cout<<endl; } return 0; }