Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
83050 sh25_huangse 矩阵交换行 C++ 通过 0 MS 256 KB 488 2026-01-20 19:19:23

Tests(1/1):


#include <iostream> using namespace std; int shu[5][5]; int main(){ int n,m; for(int i=0;i<5;++i){ for(int j=0;j<5;++j){ cin>>shu[i][j]; } } cin>>n>>m; int x[5]; for(int i=0;i<5;++i){ x[i]=shu[n-1][i]; shu[n-1][i]=shu[m-1][i]; shu[m-1][i]=x[i]; } for(int i=0;i<5;++i){ for(int j=0;j<5;++j){ cout<<shu[i][j]<<" "; } cout<<'\n'; } return 0; }


测评信息: