E(length(CH))

아직 제출이 없습니다시간 제한2초메모리 제한256 MB

문제

You are given nn points on a plane. The i-th of them is activated with probability p_ip\_i, provided as part of the input. Find the expected circumference of the convex hull of all activated points.

입력

The first line contains the number of points nn and the number pp^∗. All points are activated with the probability p_i=pp\_i = p^∗, except for the first three, which are always activated (p_1=p_2=p_3=1p\_1 = p\_2 = p\_3 = 1); this way, the definition of the convex hull circumference is always sound. This is followed by nn lines, each containing space-separated coordinates of the ii-th point, x_ix\_i, y_iy\_i.

출력

Print out a single number — the expected circumference of the convex hull. Your result should differ by less than 0.0010.001 from the reference solution to be considered correct.

제한

  • 3n10003 ≤ n ≤ 1000; 0p10 ≤ p^∗ ≤ 1
  • 0x_i,y_i10,0000 ≤ x\_i , y\_i ≤ 10\\,000; x_i,y_iZx\_i , y\_i ∈ Z
  • No three points are colinear. No two points share an xx or yy coordinate.