C++代码:
#includeusing namespace std; int main(){ int l,m,tree[10010],a,b,s=0; memset(tree,0,sizeof(tree)); cin>>l>>m; for(int i=0;i >a>>b; for(int j=a;j<=b;j++) tree[j]=1; } for(int i=0;i<=l;i++) if(tree[i]==0)s++; cout< 感谢支持!

C++代码:
#includeusing namespace std; int main(){ int l,m,tree[10010],a,b,s=0; memset(tree,0,sizeof(tree)); cin>>l>>m; for(int i=0;i >a>>b; for(int j=a;j<=b;j++) tree[j]=1; } for(int i=0;i<=l;i++) if(tree[i]==0)s++; cout< 感谢支持!