POJ-2665
来源:互联网 发布:如何在mac上切换中英文 编辑:程序博客网 时间:2024/05/29 12:16
题目分析:
求解移走划定区域树木后,剩下树木的个数。
解题思路:
没什么特别的地方。
解题代码:
#include<iostream>using namespace std;int main(int argc, char *argv[]){int L,M;while(cin>>L>>M,L||M){int treeLeft=L+1;for(int i=0;i<M;i++){int start;int end;cin>>start>>end;treeLeft-=(end-start+1);}cout<<treeLeft<<endl;}return 0;}
0 0
- poj 2665
- poj 2665
- POJ-2665
- POJ 2665 Trees
- POJ 2665 水题
- POJ 2665 Trees
- poj 2665 Trees
- POJ 2665 Trees 水
- POJ 2665 模拟,,
- POJ 2665 Trees G++
- POJ
- poj
- POJ
- POJ
- poj
- poj
- POJ
- POJ
- 黑马程序员——OC基础---protocol(协议)
- 电子或通信领域当前的技术及其社会需求调查报告
- 前缀式计算
- iOS Socket理论知识
- 实现Entity,Dao,Service,Controller,JSP代码生成神器
- POJ-2665
- iOS Socket编程-C语言版(UDP)
- CSS3伪类:valid、invalid、required
- Matlab读取同一路径下多个txt或mat文件总结
- iOS Socket编程-C语言版(TCP)
- ubuntu(虚拟机)中使用minicom
- android中webview用法总结
- 解放思想
- 11.缺陷跟踪系统Mantis的用户管理