Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
70044 sh25_zhangzh 校门外的树 C++ 通过 0 MS 260 KB 415 2025-10-16 22:22:30

Tests(1/1):


#include<iostream> using namespace std; int main() { int L,M; cin>>L>>M; int t[10001]; for(int i=0;i<=L;i++) { t[i]=1; } for(int i=0;i<M;i++) { int a,b; cin>>a>>b; for(int j=a;j<=b;j++) { t[j-1]=0; } } int s=0; for(int i=0;i<=L;i++) { s+=t[i]; } printf("%d",s); }


测评信息: