#544. 「Nowcoder多校 2019 Day1」Random Point in Triangle

「Nowcoder多校 2019 Day1」Random Point in Triangle

题目描述

Bobo has a triangle ABC with A(x1,y1),B(x2,y2) A(x_1, y_1), B(x_2, y_2) and C(x3,y3) C(x_3, y_3) . Picking a point P uniformly in triangle ABC, he wants to know the expectation value E=max{SPAB,SPBC,SPCA} E = \max\{S_{PAB}, S_{PBC}, S_{PCA}\} where SXYZ S_{XYZ} ​ denotes the area of triangle XYZ.

Print the value of 36×E 36 \times E . It can be proved that it is always an integer.

输入格式

The input consists of several test cases and is terminated by end-of-file.

Each test case contains six integers x1,y1,x2,y2,x3,y3 x_1, y_1, x_2, y_2, x_3, y_3 ​.

  • $ |x_1|, |y_1|, |x_2|, |y_2|, |x_3|, |y_3| \leq 10^8 $
  • There are at most 105 10^5 test cases.

输出格式

For each test case, print an integer which denotes the result.

样例

样例输入

0 0 1 1 2 2
0 0 0 0 1 1
0 0 0 0 0 0

样例输出

0
0
0