Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
48620 | yuzhengxun | 校门外的树 | C++ | Compile Error | 0 MS | 0 KB | 305 | 2024-06-09 18:06:45 |
#include<bits/stdc++.h> using namespace std; int main() { int L,na[10005]; cin>>l>>n; for(int i=0;i<=L;i++){ a[i]=1; } while(n--){ int l,r; cin>>l>>r; for(int i=l;i<=r;i++){ a[i]=0; } } int c=0; for(int i=0;i<=L;i++){ if(a[i]==1) c++; } cout<<c; return 0; }