- 校门外的树
- @ 2017-09-10 20:52:23
#include <iostream>
/* run this program using the console pauser or add your own getch, system("pause") or input loop /
using namespace std;
int main(int argc, char* argv) 
{
    int a,b,n,m,i,s=0,x[1100]={};
    cin>>n>>m;
    for(i=1;i<=n;i++)
    {
        cin>>a>>b;
    }
    for(i=a;i<=b;i++)
    {
         x[i]=1;
    }
    for(i=1;i<=n;i++)
       if(x[i]!=1)
       {
          s++;
       }
       cout<<s;
    return 0;
}
0 条评论
  
  目前还没有评论...