Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
154833 孔声豪 校门外的树 C++ Compile Error 0 MS 0 KB 349 2026-05-31 10:39:17

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int l,m,a1[10001]={},a2[101]={},sum=0; cin>>l>>m; for(int i=0;i<m*2;i++){ cin>>a2[i]; } for(int i=0;i<m*2;i++){ for(int j=a2[i];j<=a2[i+1];j++){ a1{j}=1; } } for(int i=0;i<1;i++){ sum++; } cout<<sum; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:11:11: error: expected ';' before '{' token
         a1{j}=1;
           ^
Main.cc:11:13: warning: statement has no effect [-Wunused-value]
         a1{j}=1;
             ^
Main.cc:11:14: error: expected primary-expression before '=' token
         a1{j}=1;
              ^