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); } }
相关文章推荐
- poj 2665 Trees
- POJ 2665 Trees(我的水题之路——移树,POJ100题啦!)
- POJ 2665 Trees 水
- POJ 2665 Trees
- POJ 2665 Trees(水题)
- (7.3.18)POJ 2665 Trees(原本打算用线段树做的,后来看了一下题目,如同当头一棒)
- POJ 2665 Trees
- poj 2665 Trees
- POJ2665 Trees
- POJ 2665 Trees(水~)
- POJ 2029 Get Many Persimmon Trees(水题)
- POJ 1105 S-Trees (模拟)
- POJ 2029 Get Many Persimmon Trees (枚举)
- POJ 2104 | HDU 2665 - K-th Number (划分树)
- POJ 2029 Get Many Persimmon Trees
- 划分树学习小记 Poj 2104+Poj 2761+Hdu 2665 (区间第k大数)
- poj 1095 Trees Made to Order 卡特兰数
- POJ-2029 Get Many Persimmon Trees 树状数组
- poj2665
- poj 2029 Get Many Persimmon Trees(二维树状数组)