No.2331 Maximum Quadrilateral
レベル :
/ AI推定難易度 : 1600
/ 実行時間制限 : 1ケース 2.000秒 / メモリ制限
: 512 MB / 標準ジャッジ問題
タグ : / 解いたユーザー数 65
作問者 :
sepa38
/ テスター :
firiexp
tyawanmusi
phocom
dyktr_06
タグ : / 解いたユーザー数 65
作問者 :
sepa38
/ テスター :
問題文最終更新日: 2023-05-23 18:37:06
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
MMA Contest 015
(順位表)
の他の問題:
Problem Statement
You are given $N$ points on a $2$-dimensional plane. For each integer $i$ satisfying $1 \leq i \leq N$, the coordinates of the $i$-th point are $(X_i, Y_i)$.
Choose $4$ distinct points among the $N$ points to form a quadrilateral. Output the integer value equal to $2$ times the maximum area of a quadrilateral that can be obtained. It can be proved that this value is always an integer.
Input
$N$ $X_1\ Y_1$ $X_2\ Y_2$ $\ \ \ \ \vdots$ $X_N\ Y_N$
Constraints
- $4 \leq N \leq 400$
- $|X_i|, |Y_i| \leq 1000$
- $(X_i, Y_i) \neq (X_j, Y_j)$ if $(i \neq j)$
- Whichever $4$ distinct points are chosen, a quadrilateral can always be formed
- All inputs are integers
Output
Output the result in $1$ line.
Sample
Sample 1
Input
4 0 0 0 1 1 0 1 1
Output
2
Only a square with side length $1$ can be formed, and its area is $1$, so output $2$.
Sample 2
Input
10 -941 -467 -821 54 -388 41 761 -797 -850 445 -88 170 929 -560 464 -540 -88 82 -940 951
Output
3110567
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。