Five Points

시간 제한2초메모리 제한512 MB

요약
서로 다른 점이 최대 다섯 개 주어지고, 각 점에서 독립적으로 균등한 방향의 반직선을 그을 때 두 반직선이 만나지 않을 확률을 구한다.
난이도

보통10점 중 6점

유형
기하, 확률, 조합론, 완전 탐색
정답자
아직 제출이 없습니다

문제

You have placed n distinct points on a plane. Then you will draw a half-line starting from each point in a direction chosen uniformly at random and independently from other points. Find the probability that no two half-lines will intersect.

입력

The first line of the input contains a single integer n (2 ≤ n ≤ 5), denoting the number of points.

The i-th of the following n lines contains two integers xi and yi (−100 ≤ xi, yi ≤ 100), denoting the coordinates of the i-th point.

No two points coincide.

출력

Display the probability that no two half-lines will have a common point. Your answer must be correct to within an absolute or relative error of 10−9.

예제2

  1. 예제 1

    입력
    2
    0 0
    1 1
    
    예상 출력
    0.7500000000000
    
  2. 예제 2

    입력
    3
    7 8
    7 7
    8 8
    
    예상 출력
    0.4303385416667