| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 70044 | sh25_zhangzh | 校门外的树 | C++ | Accepted | 0 MS | 260 KB | 415 | 2025-10-16 22:22:30 |
#include<iostream> using namespace std; int main() { int L,M; cin>>L>>M; int t[10001]; for(int i=0;i<=L;i++) { t[i]=1; } for(int i=0;i<M;i++) { int a,b; cin>>a>>b; for(int j=a;j<=b;j++) { t[j-1]=0; } } int s=0; for(int i=0;i<=L;i++) { s+=t[i]; } printf("%d",s); }