| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 77621 | 余慕涵 | 矩阵行交换 | C++ | Wrong Answer | 1 MS | 272 KB | 633 | 2024-06-14 20:08:24 |
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int main(){ int n,m,k=0,j=0,x=0,c=0; cin>>m>>n; int v[5][5]; int b[5]; for(k=0;k<5;k++){ for(j=0;j<5;j++) cin>>v[k][j];} for(x=0;x<5;x++) b[x]=v[n-1][x]; for(x=0;x<5;x++){ v[n-1][x]=v[m-1][x]; v[m-1][x]=b[x];} for(k=0;k<5;k++){ cout<<endl; for(j=0;j<5;j++) cout<<v[0][j]; cout<<" "<<v[k][j]; } return 0; }
------Input------
5 1 1 2 3 4 5 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 5 6 7 8 9
------Answer-----
5 6 7 8 9 2 3 4 5 6 3 4 5 6 7 4 5 6 7 8 1 2 3 4 5
------Your output-----
56789 2 56789 3 56789 4 56789 1 56789 32765