Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37781 jiabokai 矩阵交换行 C++ 通过 1 MS 244 KB 449 2024-01-23 10:31:40

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main() { int a[6][6]={}; int m,n; for(int row=1;row<=5;row++){ for(int col=1;col<=5;col++){ cin>>a[row][col]; } } cin>>m>>n; for(int col=1;col<=5;col++){ a[0][col]=a[m][col]; a[m][col]=a[n][col]; a[n][col]=a[0][col]; } for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }


测评信息: