Programming Exercises: Archaeological sites

Source: Internet
Author: User

Influenced by the new archaeological discoveries, the tournament has recently been fascinated by archaeology, helping archaeologists to speculate on some of the architectural structures of antiquity based on existing discoveries.

The site of the ancient sacrificial site was found in a new area, according to archaeologists, where the site was usually designed as a regular polygon, but the size of the site and the polygon angle vary depending on the size. A pillar is arranged on each corner of the polygon, and the pillars are connected by a rope.

As a result of the destruction of the newly unearthed ruins, only three pillars were found, while the remaining pillars were obliterated in the long history.

According to the known column coordinates, the archaeologists asked the little race to help calculate the smallest possible area of the sacrificial site.

Input

The first behavior of the input is a positive integer t, which indicates that there is a T group of test data. Each set of test data has three rows of data, each of which coordinates a column with an absolute value not exceeding 1000. The coordinates are floating point numbers, with a maximum of 6 decimal places.

Output

For each set of test data, output the smallest possible area in a single line, leaving 6 decimal places. There are no more than 100 corner points known to regular polygon.

Sample input

1

0.000000 0.000000

1.000000 1.000000

0.000000 1.000000

Sample output

1.000000

Programming Exercises: Archaeological sites

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.