您的位置:首页 > 其它

poj2665 Trees!

2011-07-28 11:36 267 查看
#include<cstdio>
using namespace std;
int main(){

while(1){
int count,section;
scanf("%d %d",&count,§ion);
if(0==count&&0==section){
break;
}

int left=count+1;
while(section--){
int start,end;
scanf("%d%d",&start,&end);
if(start==0&&end==0){
break;
}
left=left-(end-start+1);
}
printf("%d\n",left);
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: