Universal Cup Judging System

Universal Cup

Süre Sınırı: 2.0 s Bellek Sınırı: 1024 MB Toplam puan: 100
İstatistikler

กำหนดจุด $N$ จุดบนระนาบ 2 มิติ พิกัดของจุดที่ $i$ คือ $(x_i, y_i)$ คุณจะทำเครื่องหมายบางจุดจากจุด $N$ จุดเหล่านี้ เพื่อให้สอดคล้องกับเงื่อนไขต่อไปนี้:

  • ไม่มีรูปสี่เหลี่ยมนูน (convex quadrilateral) ใดที่มีจุดยอดที่แตกต่างกันทั้งสี่จุดอยู่ในกลุ่มจุดที่ทำเครื่องหมายไว้

จงหาจำนวนจุดที่ทำเครื่องหมายไว้ที่มากที่สุดที่เป็นไปได้

นิยามของรูปสี่เหลี่ยมนูน (Convex Quadrilateral)

รูปสี่เหลี่ยมที่เกิดจากจุดที่แตกต่างกันสี่จุดบนระนาบจะเป็นรูปสี่เหลี่ยมนูน หากสอดคล้องกับเงื่อนไขต่อไปนี้ทั้งหมด:

  • ไม่มีจุดยอดสามจุดใดๆ อยู่บนเส้นตรงเดียวกัน
  • ด้านที่ไม่อยู่ติดกันไม่มีจุดร่วมกัน
  • มุมภายในทุกมุมของรูปสี่เหลี่ยมมีขนาดน้อยกว่า $180$ องศาอย่างเคร่งครัด

ข้อมูลนำเข้า

ข้อมูลนำเข้าจะถูกกำหนดให้ในรูปแบบต่อไปนี้:

$$\begin{aligned} &N \\ &x_1 \ y_1 \\ &x_2 \ y_2 \\ &\vdots \\ &x_N \ y_N \end{aligned}$$

  • ค่าข้อมูลนำเข้าทั้งหมดเป็นจำนวนเต็ม
  • $4 \le N \le 500$
  • $|x_i|, |y_i| \le 10^8$
  • $(x_i, y_i) \ne (x_j, y_j)$ สำหรับ $i \ne j$

ข้อมูลส่งออก

พิมพ์คำตอบในบรรทัดเดียว

ตัวอย่าง

ข้อมูลนำเข้า 1

5
0 0
-1 0
0 -1
1 0
0 1

ข้อมูลส่งออก 1

4

ข้อมูลนำเข้า 2

5
0 0
1 1
2 2
2 3
3 2

ข้อมูลส่งออก 2

5

ข้อมูลนำเข้า 3

7
-1 8
11 8
-4 -2
19 12
-8 -6
7 6
-1 2

ข้อมูลส่งออก 3

6

ข้อมูลนำเข้า 4

4
0 0
2 0
1 -1
0 1

ข้อมูลส่งออก 4

3

หมายเหตุ

ในตัวอย่างแรก คุณสามารถทำเครื่องหมายสี่จุดโดยไม่รวม $(-1, 0)$ ได้ หากคุณทำเครื่องหมายทุกจุด จะมีรูปสี่เหลี่ยมนูนที่มีจุดยอดเป็นสี่จุดที่ไม่รวม $(0, 0)$ ซึ่งละเมิดเงื่อนไข

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions
#1407EditorialOpen题解jianglyView

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.