| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 84981 | sh25_wanghy | 校门外的树 | C++ | 解答错误 | 1 MS | 248 KB | 318 | 2026-03-04 20:55:49 |
#include <bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int a,bb,s=0; bool b[n]={true}; for(int i=0;i<m;++i){ cin>>a>>bb; for(int j=a;j<=bb;++j) b[j-1]=false; } for(int i=0;i<n;++i) if(b[i]==true) ++s; cout<<s; return 0; }