I、Expected Size of Random Convex Hull
题号:NC17248
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

Currently, Eddy is reading this paper "On the Expected Complexity of Random Convex Hulls"(1997). It states that the expected number of vertices of the convex hull of N points, chosen uniformly and independently from a disk is , and for the case a convex polygon with K sides, and so on. Eddy thinks it's very interesting and now wants to research something about it. But, it seems too hard to start with something like disk or polygon.

Thus, as his first step in the research, Eddy first chooses a triangle. Now, Eddy wants to find out the expected number of points on the convex hull when uniformly randomly picking N points within the triangle. However, Eddy can't find any way to solve this problem. As his best friend, you come to help Eddy finish his research debut.

输入描述:

For first three lines, each contains two space-separated integer xi, yi indicating the points(xi, yi) of the triangle Eddy chooses.
Forth line contains one integer N indicating that N points will be randomly uniformly chosen within the given triangle.

-109 ≤ xi, yi ≤ 109
3 ≤ N ≤ 10
It's guaranteed that given input forms a non-degenerate triangle

输出描述:

Output a floating number indicating the expected number of points on the convex hull.

Absolutely or relatively error within 10-4 will be considered correct.
示例1

输入

复制
0 0
1 0
2 1
3

输出

复制
3.000000000000