8564: Rotate Sum 3

内存限制:256 MB 时间限制:1 S 标准输入输出
题目类型:传统 评测方式:Special Judge 上传者:
提交:3 通过:0

题目描述

链接:https://ac.nowcoder.com/acm/contest/33192/B
来源:牛客网
Grammy loves geometry. Today, she takes out her precious convex polygon and plays with it.

Grammy thinks that symmetry is a fun characteristic for a convex polygon, so she draws out all the axes of symmetry on the polygon.

NIO is a naughty boy. He repeats the following operation several times. In each operation, he chooses an axis of symmetry as the rotation axis and rotates the polygon along the axis arbitrarily. Note that after rotating the polygon, the axes of symmetry will also rotate with the polygon.

Grammy wants to know the total volume that can be sweeped by the convex polygon during NIO's operations. Please help her.

输入格式


The first line contains an integer nnn (3≤n≤1053\leq n \leq 10^53n105), denoting the number of vertices of the convex polygon.
In each of the next nnn lines contains two integers xi,yix_i,y_ixi,yi (−109≤xi,yi≤109-10^9 \leq x_i,y_i \leq 10^9109xi,yi109), denoting the coordinates of the iii-th vertex. The vertices are given in counterclockwise order.
It is guaranteed that the polygon does not self-intersect at any point.

输出格式


Output a real number, denoting the volume of the sweeped area. Your answer will be considered correct if the absolute or relative error is less than 10−610^{-6}106.

输入样例 复制

3
0 -1
1 0
0 1

输出样例 复制

1.047197551197

分类标签