Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
39860 闻航 矩阵交换行 C++ 通过 0 MS 260 KB 376 2024-02-04 21:00:17

Tests(1/1):


#include<iostream> using namespace std; int main() { int a[10][10],b[10],n,m; for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cin>>a[i][j]; } } cin>>n>>m; for(int col=1;col<=5;col++){ b[col]=a[n][col]; a[n][col]=a[m][col]; a[m][col]=b[col]; } for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cout<<a[i][j]<<" "; } cout<<endl; } }


测评信息: