| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 35480 | yangyuezheng | 校门外的树 | C++ | Time Limit Exceeded | 3000 MS | 240 KB | 422 | 2023-12-31 18:56:58 |
#include<iostream> #include<iomanip> using namespace std; int main(){ int l,m; cin>>l>>m; int s[l+1]={0}; int a,b; for(int i=0;1<m;i++) { cin>>a>>b; for(int j=a;j<=b;j++) { s[j]=-1; } } int d=0; for(int i=0;i<=l;i++) { if(s[i] == 0) { d++; } } cout<<d; return 0; }