| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 154763 | 余建成 | 校门外的树 | C++ | Compile Error | 0 MS | 0 KB | 445 | 2026-05-30 20:17:08 |
#include<iostream> #include<vector> using namespace std; int main(){ int a b; cin>>a>>b; vector<bool>tree(a+1,true); for(int i=0;i<b;++i){ int start,end; cin>>start>>end; for(int j=start;j<=end;++j){ tree[j]=false; } } int count=0; for(int i=0;i<=a;++i){ if(tree[i]){ count++; } } cout<<count<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:11: error: expected initializer before 'b'
int a b;
^
Main.cc:6:10: error: 'a' was not declared in this scope
cin>>a>>b;
^
Main.cc:6:13: error: 'b' was not declared in this scope
cin>>a>>b;
^