22687_BlueBob

2022-5-16 18:22| 发布者: Hocassian| 查看: 25| 评论: 0|原作者: 肇庆学院ACM合集

摘要:
C:\Users\Administrator\Downloads\2019-10-12-10-14-5-89506855608000-Problem List-采集的数据-后羿采集器.html

Pro.ID

22687

Title

Blue Bob

Title链接

http://10.20.2.8/oj/exercise/problem?problem_id=22687

AC

0

Submit

0

Ratio

-

时间&空间限制

  • Time Limit: 2000/1000 MS (Java/Others)     Memory Limit: 6/65536 K (Java/Others)
  • 描述

    Bob is well known silly boy. He always loses the game when playing with Alice. Recently, he reads many books about game theory, and thinks that he is good at playing games now. So he asks Alice to play game with him again.

    The new game goes in the following ways (as demonstrated in Figure 1)

    (a) There is a triangle;

    (b) Alice selects one point inside the triangle;

    (c) Bob draw one line across the point and cut the triangle into two parts;

    (d) Finally, Bob will get the larger one of the two parts.

    Figure 1   An example of the game

    After Alice explains these rules, Bob has no idea how to do. Could you tell Bob what is the maximum area he can get if both of them play perfectly?

    输入

    The first line of the input is a positive integer C, denoting the number of test cases followed.

    Input of each test case is six non-negative integers, x_a, y_a, x_b, y_b, x_c, y_c, coordinates of the three vertices. All these integers are smaller than 10000.

    输出

    Description

    Bob is well known silly boy. He always loses the game when playing with Alice. Recently, he reads many books about game theory, and thinks that he is good at playing games now. So he asks Alice to play game with him again.

    The new game goes in the following ways (as demonstrated in Figure 1)

    (a) There is a triangle;

    (b) Alice selects one point inside the triangle;

    (c) Bob draw one line across the point and cut the triangle into two parts;

    (d) Finally, Bob will get the larger one of the two parts.

    Figure 1   An example of the game

    After Alice explains these rules, Bob has no idea how to do. Could you tell Bob what is the maximum area he can get if both of them play perfectly?

    Input

    The first line of the input is a positive integer C, denoting the number of test cases followed.

    Input of each test case is six non-negative integers, x_a, y_a, x_b, y_b, x_c, y_c, coordinates of the three vertices. All these integers are smaller than 10000.

    Output

    The output should consist of C lines, one line for each test case, only containing one real number which represents the maximum area Bob can get, exact to one decimal after the decimal point. No redundant spaces are needed.

    Sample Input

    1
    0 0 5 1 10 0

    Sample Output

    2.8

    Source

    样例输入

    1
    0 0 5 1 10 0

    样例输出

    2.8

    作者


    路过

    雷人

    握手

    鲜花

    鸡蛋

    最新评论

    返回顶部