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

30596번 - Axis-Aligned Area 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB39131428680.563%

문제

Alex has four sticks with positive integer lengths $a_1,ドル $a_2,ドル $a_3,ドル and $a_4$ ($a_1 \le a_2 \le a_3 \le a_4$).

She wants to place them on a plane in such a way that each stick is parallel to one of the two coordinate axes, and the area enclosed by these sticks is as large as possible.

Find this maximum enclosed area.

입력

The input contains four positive integers $a_1,ドル $a_2,ドル $a_3,ドル and $a_4,ドル each on a separate line, denoting the lengths of the sticks in non-decreasing order (1ドル \le a_1 \le a_2 \le a_3 \le a_4 \le 100$).

출력

Print the maximum area that can be enclosed.

제한

예제 입력 1

2
2
4
7

예제 출력 1

8

예제 입력 2

10
10
10
10

예제 출력 2

100

힌트

Here is one optimal way to place the sticks on the plane for the first example:

The enclosed area is shaded in gray.

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > ICPC 2023-2024 Northwestern Russia Regional Contest A번

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

출처

대학교 대회

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

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