Logo
(追記) (追記ここまで)

3517번 - Kids Like Cakes 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 256 MB4000.000%

문제

Kids like cakes. It’s obvious. In this problem, we consider only cakes having the form of a convex polygon, as viewed from above.

Every cake needs to be split into pieces. In this problem, every piece should have a form of a non-degenerate triangle with vertices at original cake’s vertices. The pieces may not intersect, and their union should form the original cake.

Some kids also like fairness. Let’s call the unfairness number of a cake the maximal possible difference between the areas of the largest and the smallest pieces of it.

Your task is to find the unfairness number of a given cake.

입력

The first line of the input file contains a single integer number n — the number of vertices of the cake (4 ≤ n ≤ 5000). The following n lines contain two integers xi, yi each — the coordinates of the vertices (−108 ≤ xi, yi ≤ 108).

출력

The first line of the output file must contain a single number with exactly one digit after the decimal point — the unfairness number of the cake.

The following two lines must describe the way to split the cake to get such unfairness number. The first of them should contain three indices of vertices of the largest piece in it. The second one should contain three indices of vertices of the smallest piece. Vertices are numbered from 1 to n.

제한

예제 입력 1

5
0 0
-1 6
0 7
2 8
7 7

예제 출력 1

24.0
2 5 1
2 3 4

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > NEERC Northern Subregional 2011 K번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /