| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 130838 | Kevin | 校门外的树 | C++ | Accepted | 2 MS | 304 KB | 312 | 2025-09-19 18:29:52 |
#include<bits/stdc++.h> using namespace std; int a[10005]; int main(){ int l,m,b,c,s=0; cin>>l>>m; for(int i=0;i<=l;i++){ a[i]=1; } for(int i=1;i<=m;i++){ cin>>b>>c; for(int i=b;i<=c;i++) { a[i]=0; } } for(int i=0;i<=l;i++){ if(a[i]==1) s++; } cout<<s; return 0; }