| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149868 | 李亭绪 | 校门外的树 | C++ | Accepted | 1 MS | 308 KB | 353 | 2026-03-19 21:12:50 |
#include<iostream> using namespace std; int main(){ int l,m,t[10001]={0},a,b,sum=0; cin>>l>>m; for(int i=1;i<=m;i++){ cin>>a>>b; for(int j=a;j<=b;j++){ t[j]=1; } } for(int i=0;i<=l;i++){ if(t[i]==0){ sum++; } } cout<<sum<<endl; return 0; }