| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150531 | 张锦程 | 校门外的树 | C++ | Accepted | 2 MS | 316 KB | 348 | 2026-03-28 15:36:34 |
#include<bits/stdc++.h> using namespace std; int main(){ int l,m,s1=0,a[10001]={}; cin>>l>>m; for(int i=1;i<=m;i++){ int s,e; cin>>s>>e; for(int j=s;j<=e;j++){ if(a[j]==0){ s1+=1; a[j]=1; } } }cout<<l+1-s1<<endl; return 0; }