ural 1058 chocolate
2015-08-01 14:02
281 查看
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u
Submit Status Practice URAL 1058
Description
Fishburg confectionery factory produces convex polygon-shaped chocolates. Little Boy and Karlsson bought one and wanted to break it into two fragments. The areas of the fragments must be equal. Create a code to find out the length of breakage-line of a minimal length using the given chocolate form.
Input
The first line of input contains an integer N — the number of polygon vertices (4 ≤ N ≤ 50). The other N lines contain coordinates of the vertices in the counter-clockwise order. Coordinates are real numbers from −100 to 100 and given with at most 3 digits after decimal point.
Output
Output should contain the minimal length of breakage-line with accuracy to 0.0001.
Sample Input
View Code
Submit Status Practice URAL 1058
Description
Fishburg confectionery factory produces convex polygon-shaped chocolates. Little Boy and Karlsson bought one and wanted to break it into two fragments. The areas of the fragments must be equal. Create a code to find out the length of breakage-line of a minimal length using the given chocolate form.
Input
The first line of input contains an integer N — the number of polygon vertices (4 ≤ N ≤ 50). The other N lines contain coordinates of the vertices in the counter-clockwise order. Coordinates are real numbers from −100 to 100 and given with at most 3 digits after decimal point.
Output
Output should contain the minimal length of breakage-line with accuracy to 0.0001.
Sample Input
input | output |
---|---|
4 0 0 4 0 4 3 0 3 | 3 |
#include <stdio.h>
View Code
相关文章推荐
- CNN
- python模块 - 常用模块推荐
- Leetcode #80 Remove Duplicates from Sorted Array II
- HDU 1695 GCD 莫比乌斯第二发
- python模块 - 其它常用模块推荐
- js数组去重的几种方法
- hide the navigationBar and tabBar
- Selenium2学习-022-WebUI自动化实战实例-020-JavaScript 在 Selenium 自动化中的应用实例之二(获取浏览器显示区域大小)
- Android学习笔记之Context
- linux 基本命令之fg、bg、jobs、&、ctrl + z
- js 开发框架集合
- 离钱越近,才能赚钱越‘稳’
- [二分+模拟]poj 3273 Monthly Expense
- 整除15问题
- Windows 10正式版为什么没有休眠选项? 找回win10休眠选项的方法
- php学习笔记_4_常量及魔法常量需要注意的点
- hdoj背包水题
- 1032. 挖掘机技术哪家强(20)
- ubuntu恢复模式下磁盘只读问题
- 暑假集训第三周第二阶段搜索 G - 迷宫问题