| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61921 | 陈梓睿 | 校门外的树 | C++ | Accepted | 1 MS | 312 KB | 299 | 2023-12-15 22:26:09 |
#include<bits/stdc++.h> using namespace std; int l,m,st,en; long long ans; int f[100000]; int main(){ cin>>l>>m; for(int i = 0;i<m;i++){ cin>>st>>en; for(int j = st;j<=en;j++){ f[j] = 1; } } for(int i = 0;i<=l;i++){ if(f[i]==0) ans++; } cout<<ans; return 0; }