Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150530 马俊潇 校门外的树 C++ Compile Error 0 MS 0 KB 269 2026-03-28 15:36:27

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int a[100000]={}l,m,s1=0; cin>>l>>m; for(int i=1;i<=m;i++){ int s,e; cin>>s>>e; for(int j=s;j<=e;j++){ if(a[j]==0){ s1+=1; a[j]=1;}}} cout<<l+1-s1; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:17: error: expected ',' or ';' before 'l'
 int a[100000]={}l,m,s1=0;
                 ^
Main.cc:5:9: error: 'l' was not declared in this scope
    cin>>l>>m;
         ^
Main.cc:5:12: error: 'm' was not declared in this scope
    cin>>l>>m;
            ^
Main.cc:12:5: error: 's1' was not declared in this scope
     s1+=1;
     ^
Main.cc:14:14: error: 's1' was not declared in this scope
    cout<