Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
83419 刘慕莀 矩阵行交换 C++ Compile Error 0 MS 0 KB 302 2024-07-14 14:50:15

Tests(0/0):


Code:

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


Run Info:

Main.cc: In function 'int main()':
Main.cc:5:11: error: expected initializer before 'm'
     int n m;
           ^
Main.cc:6:7: error: 'n' was not declared in this scope
  cin>>n>>m;
       ^
Main.cc:6:10: error: 'm' was not declared in this scope
  cin>>n>>m;
          ^
Main.cc:13:16: error: expected primary-expression before ';' token
  for(int j=0;j<;i++){
                ^
Main.cc:13:17: error: 'i' was not declared in this scope
  for(int j=0;j<;i++){
                 ^
Main.cc:15:9: error: 'b' was not declared in this scope
  a[n-1][b]=a[m-1][b];
         ^