poj 2665
2014-11-08 17:06
155 查看
//poj 2665 小学生题 种树题 #include <iostream> #include <algorithm> #include <math.h> #include <string> using namespace std; int main() { int n, m; cin>>n; cin>>m; while( n != 0 && m != 0) { int start, end; n = n+1; for(int i = 0; i < m; i++) { cin>>start>>end; n -= (end - start + 1); } cout<<n<<endl; cin>>n; cin>>m; } return 0; }
相关文章推荐
- poj 2665 Trees
- POJ 2665 Trees
- POJ 2665 Trees
- 划分树 例题:POJ-2104/HDU-2665
- POJ- 2104 hdu 2665 (区间第k小 可持久化线段树)
- 【归并树—求第K小数】POJ 2104/HDU 2665
- hdu 2665 (poj 2104) 划分树
- POJ 2665 模拟,,
- poj 2665 Trees
- POJ 2104 & HDU 2665 & POJ 2761 K-th Number (主席树入门题 区间第K大)
- POJ 2665 Trees(我的水题之路——移树,POJ100题啦!)
- POJ 2665 模拟,,
- 【POJ 2104/HDU 2665】K-th Number【整体二分/主席树】
- POJ 2104 & HDU 2665 K-th Number (划分树)
- POJ 2665 Trees(水~)
- poj 2665
- POJ2665 Trees
- 划分树学习小记 Poj 2104+Poj 2761+Hdu 2665 (区间第k大数)
- poj2665 Trees!
- POJ 2665 水题