Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
90133 sh25_zhangyj 矩阵交换行 C++ 通过 1 MS 248 KB 407 2026-06-05 15:13:38

Tests(1/1):


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


测评信息: