Ural 1058 Chocolate

Source: Internet
Author: User

Time limit:1000MS Memory Limit:65536KB 64bit IO Format:%i64d &%i64 U SubmitStatusPracticeURAL 1058

Description

Fishburg Confectionery Factory produces convex polygon-shaped chocolates. Little Boy and Karlsson bought one and wanted to the break it into the 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 NLines contain coordinates of the vertices in the counter-clockwise order. Coordinates is real numbers from−100 to + given with at the 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
40 04 04) 30 3
3
1 #include <stdio.h>
View Code

Ural 1058 Chocolate

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.