1753.
Hard challenge
时间限制 2000 ms
内存限制 512 MB
There are $n$ points on the plane, and the $i$th points has a value $val_i$, and its coordinate is $(x_i,y_i)$. It is guaranteed that no two points have the same coordinate, and no two points makes the line which passes them also passes the origin point. For every two points, there is a segment connecting them, and the segment has a value which equals the product of the values of the two points. Now HazelFan want to draw a line throgh the origin point but not through any given points, and he define the score is the sum of the values of all segments that the line crosses. Please tell him the maximum score.
输入数据
输出数据
For each test case:
A single line contains a nonnegative integer, denoting the answer.
样例输入
复制
2
2
1 1 1
1 -1 1
3
1 1 1
1 -1 10
-1 0 100
\n
\n
· · \n
· · \n
\n
· · \n
· · \n
· · \n