Kornislav
의견: 0
Kornislav the turtle never has anything interesting to do. Since he's going to live for three hundred
years, he keeps trying to find way to kill time. This weekend he started playing "enclose the largest
rectangle".
To start with, Kornislav needs four positive integers. He tries to enclose a rectangle by moving in one
direction, then turning 90 degrees, then walking in the new direction etc. Kornislav makes a total of
three \(90-de\)gree turns and walks four segments.
When walking in some direction, the number of steps he takes must be equal to one of the four chosen
integers and each integer must be used exactly once. Depending on the order in which Kornislav uses
the integers, his walk will make various shapes, some of which don't contain enclosed rectangles.
Write a program that calculates the largest rectangle the turtle can enclose with its walk.
The first line contains four positive integers \(A\), \(B\), \(C\) and \(D\) (\(0 < A, B, C, D < 100\)), the four chosen integers.
Output the largest area.
| 서브태스크 | 점수 | 설명 |
|---|---|---|
Subtask 1 | 30점 |
1 2 3 434 4 3 412평가 및 의견
Kornislav
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Kornislav