Rectangle
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
Special for beginners, ^_^
Description
小A正在和小B玩游戏。 小A拿到了n个点,现在她和小B要分别选一个点,使得两人所选的点之间的欧几里得距离尽可能大。 我们认为小A和小B都会以最优策略进行游戏,请问最终她们可能会选择哪两个点?
【名词解释】 欧几里得距离:定义两点𝐴(𝑥1,𝑦1),𝐵(𝑥2,𝑦2)的欧几里得距离为根号下横坐标之差的平方加纵坐标之差的平方,就是初中学的两点距离公式。
Format
Input
第一行输入一个整数𝑛(1≦𝑛≦1000)。 之后的𝑛行,每行输入两个整数𝑥𝑖,𝑦𝑖(−1000≦𝑥𝑖,𝑦𝑖≦1000),代表一个坐标为(𝑥i,𝑦𝑖)的点。
Output
输出四个整数,代表他们选择的两个点,(x1,y1),(x2,y2),要求按大小顺序(先看x的大小再看y的大小)输出。
Samples
4
1 1
2 2
3 3
4 4
1 1 4 4
Limitation
1s, 1024KiB for each test case.
2025新生第三次周赛
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 7
- Start at
- 2025-11-23 8:45
- End at
- 2025-11-23 11:45
- Duration
- 3 hour(s)
- Host
- Partic.
- 27