Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37226 奚晨瑞 矩阵交换行 C++ 解答错误 1 MS 248 KB 455 2024-01-19 16:36:58

Tests(0/1):


#include<iostream> 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 m,n; cin>>m>>n; for(int i=0;i<5;i++){ if(i==n+1){ for(int j=0;j<5;j++){ cout<<a[m][j]<<" "; } } else if(i==m+1){ for(int j=0;j<5;j++){ cout<<a[n][j]<<" "; } } else{ for(int j=0;j<5;j++){ cout<<a[i][j]<<" "; } } cout<<endl; } return 0; }


测评信息:

输入

1 2 2 1 2
5 6 7 8 3
9 3 0 5 3
7 2 1 4 6
3 0 8 2 4
1 5

输出

1 2 2 1 2 
5 6 7 8 3
0 -1992583168 1870638432 760125352 32765
7 2 1 4 6
3 0 8 2 4

答案

3 0 8 2 4
5 6 7 8 3
9 3 0 5 3
7 2 1 4 6
1 2 2 1 2

系统信息

exit code: 0, checker exit code: 0