| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 162744 | 罗嘉睿 | 校门外的树 | C++ | Accepted | 1 MS | 280 KB | 425 | 2026-10-18 16:53:56 |
#include <bits/stdc++.h> using namespace std; int main() { int a,b; cin>>a>>b; bool c[10001]={false}; int d,e; for (int i=0;i<b;++i) { cin>>d>>e; if (d>e)swap(d,e); for (int j=d;j<=e;j++) { c[j]=true; } } int f=0; for (int i=0;i<=a;i++) { if(c[i])f++; } cout<<(a+1-f)<<endl; return 0; }