Pro.ID22687 TitleBlue Bob Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22687 AC0 Submit0 Ratio- 时间&空间限制描述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 Sample Output 2.8 Source 样例输入1 样例输出2.8 作者 |