No.2790 Athena 3
問題文最終更新日: 2024-06-15 14:40:42
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 434
(順位表)
の他の問題:
Problem Statement
There are $3$ points $A=(x_1, y_1), B=(x_2, y_2), C=(x_3, y_3)$ on the coordinate plane.
For each point, perform $1$ of the following operations.
- Increase the $x$ coordinate by $1$
- Decrease the $x$ coordinate by $1$
- Increase the $y$ coordinate by $1$
- Decrease the $y$ coordinate by $1$
Find the maximum possible area of triangle $ABC$ after the operations.
Constraints
- $-100\le x_1,y_1,x_2,y_2,x_3,y_3\le 100$
- All inputs are integers
Input
The input is given from standard input in the following format.$x_1$ $y_1$ $x_2$ $y_2$ $x_3$ $y_3$
Output
Output the maximum possible area of triangle $ABC$ after the operations.
Sample
Sample 1
Input
1 1 2 3 5 8
Output
7.5
Initially, $A=(1,1), B=(2,3), C=(5,8)$. Perform the operations as follows.
- Change point $A$ from $(1,1)$ to $(1,0)$.
- Change point $B$ from $(2,3)$ to $(1,3)$.
- Change point $C$ from $(5,8)$ to $(6,8)$.
The area of triangle $ABC$ after the operations is $7.5$. This is the maximum.
Sample 2
Input
0 0 0 0 0 0
Output
1.0
Sample 3
Input
-100 -100 -100 100 100 100
Output
20301.0
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。