11 条题解
-
0
#include<bits/stdc++.h> using namespace std; int main(){ int L,sum=0; cin>>L; int a[10001]={}; int M; cin>>M; int x,y; for(int i=0;i<M;i++){ cin>>x>>y; for(int j=x;j<=y;j++){ a[j]=1; } } for(int i=0;i<=L;i++){ if(a[i]==0){ sum++; } } cout<<sum; return 0; } ``` [Copy](javascript:;) # 信息 递交者 [尹晨恩 (yinchenen) ](http://temege.com/user/3744)[LV 4](http://temege.com/user/3744)题目[**P677** 校门外的树](http://temege.com/p/677)语言C++ 11递交时间**4 分钟前**分数100总耗时7ms峰值内存312 KiB # 状态 * [评测队列](http://temege.com/record) * [服务状态](http://temege.com/status) # 开发 * [开源](https://github.com/hydro-dev/Hydro) ```
信息
- ID
- 677
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 6
- 标签
- 递交数
- 926
- 已通过
- 262
- 上传者