Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44256 | 惠子铭 | 矩阵交换行 | C++ | Accepted | 0 MS | 244 KB | 302 | 2024-03-29 15:55:09 |
#include<bits/stdc++.h> using namespace std; int jz[5][5]; int main(){ for(int i = 0;i < 5;i ++)for(int j = 0;j < 5;j ++)cin>>jz[i][j]; int a,b;cin>>a>>b; swap(jz[a-1],jz[b-1]); for(int i = 0;i < 5;i ++){for(int j = 0;j < 5;j ++)cout<<jz[i][j]<<' ';cout<<endl;} return 0; }