CF559D Randomizer
题目描述
给定一个包含$n$个点的凸多边形,等概率选取顶点集中大于等于三的子集形成一个新凸多边形,求新凸多边形内部(不包含边界)整点个数的期望值。
输入格式
第一行一个整数$n(3\le n\le 10^5)$;
以下$n$行,第$i+1$行包含两个整数$x_i,y_i(-10^9\le x_i,y_i\le 10^9)$表示一个顶点的坐标,顶点坐标按顺时针给出。
输出格式
一行一个小数,表示整点个数的期望值,精确度$10^{-9}$
说明/提示
A polygon is called strictly convex if it is convex and no its vertices lie on the same line.
Let's assume that a random variable takes values $ x_{1},...,x_{n} $ with probabilities $ p_{1},...,p_{n} $ , correspondingly. Then the expected value of this variable equals to .