Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154534 王培臻 矩阵行交换 C++ Compile Error 0 MS 0 KB 415 2026-05-30 15:00:57

Tests(0/0):


Code:

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


Run Info:

Main.cc: In lambda function:
Main.cc:15:13: error: expected '{' before '[' token
    cout<<[s][j]<<" ";
             ^
Main.cc: In function 'int main()':
Main.cc:15:13: error: no match for 'operator[]' (operand types are 'main()::' and 'int')