- 校门外的树
If you want to AC ,Looking there!
- @ 2025-12-6 16:30:56
#include<bits/stdc++.h> using namespace std; int main() { int a[11111]={},l,m,x,y,cnt=0; cin>>l>>m; while(m--){ cin>>x>>y; for(int i=x;i<=y;i++){ a[i]=1; } } for(int i=0;i<=l;i++){ if(a[i]==0){ cnt++; } } cout<<cnt<<endl; return 0; }
0 条评论
目前还没有评论...
信息
- ID
- 109
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 5
- 标签
- (无)
- 递交数
- 504
- 已通过
- 183
- 上传者