zoj 2157 || poj 1788 Building a New Depot
来源:互联网 发布:绿地集团工作知乎 编辑:程序博客网 时间:2024/06/14 07:37
给你N个点,求出这些点组成的图形的周长,凸凹都可能。
会升提的这个题。。。><。。我承认木有认真看题,没注意这些点都在拐点上,会升说了他的想法,现在重新看题后,觉得应该是对的。
因为这些点必须在拐点上,所以,排序后,每一行的点必须为偶数个。因为是连通块,所以,这一行的第一个点和第二个点必须有线,二三之间必然在这一行不存在连接的线。。。以此类推。。
而因为总个数是偶数,所以只用考虑第i和 i+1连线,i+2和i+3连线即可。
提供几组数据~
12
2 3
3 3
2 4
3 4
1 2
1 3
2 1
2 2
3 1
3 2
4 2
4 3
the answer is : 12
8
1 1
0 1
0 2
2 1
3 1
2 2
1 0
3 0
the answer is : 10
12
2 0
3 0
0 1
2 1
0 2
1 2
0 3
1 3
2 3
3 3
0 4
2 4
the answer is : 16
- ZOJ 2157 Building a New Depot(POJ 1788)
- zoj 2157 || poj 1788 Building a New Depot
- poj 1788 Building a New Depot
- POJ 1788 Building a New Depot 笔记
- POJ 1788 Building a New Depot
- POJ Building a New Depot
- ZOJ 2157|| Building a New Depot(纵向排序 横向排序
- POJ 1788 Building a New Depot(计算正多边形边长)
- POJ 1788 Building a New Depot(水~)
- C语言--Building a New Depot
- poj 3269 Building A New Barn
- poj 2031 && zoj 1718 Building a Space Station
- POJ 2031 ZOJ 1718 Building a Space Station
- Building a New Framework
- poj 2031 zoj 1718 Building a Space Station(最小生成树)
- POJ 2031 && ZOJ 1718--Building a Space Station【最小生成树 && kurskal && 水题】
- ZOJ 1718 Building a Space Station
- Building Android for a new Mobile Device
- Oracle笔记 十三、PL/SQL面向对象之package
- uva 540 team queue
- SQLServer数据表分区优化数据库
- CE5.0 驱动程序:设备管理器的源码分析
- Referenced Assembly could not be resolved because it has a dependency conflict 解决方法
- zoj 2157 || poj 1788 Building a New Depot
- 程序员是这样炼成的(9)- 每天有目标的编程
- DB2中ALTER TABLE为什么需要REORG操作?
- css的优先级的几个基本的规则
- 答辩名词解释准备
- grep查找词组
- Trie树原理和实现
- 程序员如何在"小公司成长"和"大公司学习"
- RIM发布全键盘触屏黑莓Bold 9900和OS7