Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98520 黄睿杰 矩阵行交换 C++ Compile Error 0 MS 0 KB 479 2024-11-23 11:14:49

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:15:17: error: 'n5' was not declared in this scope
  for(int i=1;i<=n5;i++){
                 ^
Main.cc:20:17: error: 'm' was not declared in this scope
  for(int i=1;i<=m;i++){
                 ^
Main.cc:21:18: error: 'n' was not declared in this scope
   for(int j=1;j<=n;j++){
                  ^