| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 121138 | 刘宸熠 | 校门外的树 | C++ | Compile Error | 0 MS | 0 KB | 267 | 2025-06-06 20:00:46 |
#include<bits/stdc++.h> using namespace std; int main() { int a[10001]=0,m,ks,l,js; cin>>l>>m; for(int i=1;i<=m;i++){ cin>>ks>>js; for(int j=ks;j<=js;j++) a[j]=1; } for(int i=0;i<=l;i++){ if(a[i]==0) sum++; } cout<<sum; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:15: error: array must be initialized with a brace-enclosed initializer
int a[10001]=0,m,ks,l,js;
^
Main.cc:14:3: error: 'sum' was not declared in this scope
sum++;
^
Main.cc:16:8: error: 'sum' was not declared in this scope
cout<