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

33182번 - Largest Triangle 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB887100.000%

문제

A “terrain” is an $x$-monotone polygon defined by the points $p_1, \dots , p_n$ where each point $p_i$ has coordinates $(x_i , y_i),ドル and the following three conditions hold:

  • $y_1 = y_n = 0$
  • $y_i > 0$ for 1ドル < i < n$
  • $x_i < x_{i+1}$ for 1ドル \le i < n$

Given a terrain defined by the points $p_1, \dots , p_n,ドル find the largest triangle that fits entirely within the terrain, and one of its three vertices is positioned at one of the terrain points $p_2$ through $p_{n-1}$.

입력

The first line of input contains an integer $n,ドル representing the number of points in the terrain (3ドル \le n \le 10^5$). The $i$th line in the following $n$ lines consists of two space-separated integers $x_i$ and $y_i,ドル representing the point $p_i$ of the terrain (0ドル \le x_i , y_i \le 10^9$).

출력

Print the area of the largest triangle contained within the terrain. Your output will be considered correct if its absolute or relative error is at most 10ドル^{-6}$.

제한

예제 입력 1

11
0 0
2 10
4 5
6 7
8 8
10 4
12 6
14 4
15 4
16 7
17 0

예제 출력 1

53.666667

힌트

출처

ICPC > Regionals > Asia West Continent > Iran > 2023 ICPC Asia Tehran Regional Contest E번

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

출처

대학교 대회

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

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