当前位置: 首页 > 工具软件 > Circus > 使用案例 >

Ancient Berland Circus

徐智渊
2023-12-01

描述:

Nowadays all circuses in Berland have a round arena with diameter 13 meters, but in the past things were different.

In Ancient Berland arenas in circuses were shaped as a regular (equiangular) polygon, the size and the number of angles could vary from one circus to another. In each corner of the arena there was a special pillar, and the rope strung between the pillars marked the arena edges.

Recently the scientists from Berland have discovered the remains of the ancient circus arena. They found only three pillars, the others were destroyed by the time.

You are given the coordinates of these three pillars. Find out what is the smallest area that the arena could have.

输入:

The input file consists of three lines, each of them contains a pair of numbers –– coordinates of the pillar. Any coordinate doesn't exceed 1000 by absolute value, and is given with at most six digits after decimal point.

输出:

Output the smallest possible area of the ancient arena. This number should be accurate to at least 6 digits after the decimal point. It's guaranteed that the number of angles in the optimal polygon is not larger than 100.

样例输入:

0.000000 0.000000
1.000000 1.000000
0.000000 1.000000

样例输出:

1.00000000

描述:

现如今所有在伯兰的马戏团都有一个直径为13米的圆形的竞技,但在过去情况是不同的。

在古代的伯兰,马戏竞技场被塑造为一个正多边形(等角的),各个马戏场的角度的大小和角的个数都不同。在每个竞技场的角落有一根特别的柱子,并且在柱子之间悬挂的绳子标志着竞技场的边缘。

前不久来自伯兰的科学家们发现了古代的马戏竞技场的遗迹。他们只发现了三个柱子,剩下的在这之前就已经被破坏了。

这三根柱子的坐标提供给你。找出竞技场的最小区域。

输入:

输入文件由三行组成,每一行包括一对数字——柱子的坐标。任何坐标的绝对值都不超过1000,并且小数点后最多只有6位数。

输出:

输出尽可能小的古代竞技场的区域,这个数字至少应该精确到小数点后六位数。它保证了最优多边形的角度不超过100。

样例输入:

0.000000 0.000000
1.000000 1.000000
0.000000 1.000000

样例输出:

1.00000000

题目地址链接:Problem - C - Codeforces

 类似资料:

相关阅读

相关文章

相关问答