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

13743번 - Enclosure 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB27131152.381%

문제

In the Dark Forest, you control some trees. The territory you control is defined by the smallest convex shape that contains all of the trees that you control. Your power is defined by the area of this convex shape. You may control trees inside the convex shape that are not on the edge of the shape.

You currently control k trees of the n in the forest. You want to extend your power by gaining control over a single additional tree, somewhere in the forest. After acquiring the single tree that most increases your power, what is the area of your new shape?

입력

Each input will consist of a single test case. Note that your program may be run multiple times on different inputs. The first line of input contains two space-separated integers n and k (3 ≤ k < n ≤ 100,000), where n is the total number of trees, and k is the number of
trees that you control.

The next n lines each have two space-separated integers x and y (-109 ≤ x,y ≤ 109) specifying the locations of the n trees. The first k trees in the list are the trees that you control. No three trees will have collinear locations. Note that there may be trees that
you don’t control within your shape.

출력

Output a single floating point number, which is the largest area you can achieve by controlling a single additional tree. Output this number to exactly one decimal place.

제한

예제 입력 1

5 3
-5 -5
-5 5
5 -5
-4 6
5 5

예제 출력 1

100.0

힌트

출처

ICPC > Regionals > North America > Southeast USA Regional > 2016 Southeast USA Regional Programming Contest > Division 1 D번

ICPC > Regionals > North America > Pacific Northwest Regional > 2016 Pacific Northwest Region Programming Contest > Division 1 E번

ICPC > Regionals > North America > Mid-Atlantic Regional > 2016 Mid-Atlantic Regional Programming Contest D번

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

출처

대학교 대회

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

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