Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37366 IKUN(ZHC) 矩阵交换行 C++ 通过 1 MS 260 KB 372 2024-01-20 12:11:22

Tests(1/1):


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


测评信息: