Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150527 8 校门外的树 C++ Compile Error 0 MS 0 KB 341 2026-03-28 15:35:31

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ int l,m,s1=0,a[100000]={}; 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<<i+1-s1; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:16:11: error: 'i' was not declared in this scope
     cout<