Universal Cup Judging System

Universal Cup

Time Limit: 2.0 s Memory Limit: 1024 MB Total points: 100
Statistics

נתונות לך $N$ נקודות במישור דו-ממדי. הקואורדינטות של הנקודה ה-$i$ הן $(x_i, y_i)$. תסמן חלק מ-$N$ נקודות אלו כך שהתנאי הבא יתקיים:

  • אין מרובע קמור שארבעת קודקודיו השונים נמצאים כולם בין הנקודות המסומנות.

מצא את המספר המקסימלי האפשרי של נקודות מסומנות.

הגדרה של מרובע קמור

מרובע הנוצר על ידי ארבע נקודות שונות במישור הוא מרובע קמור אם הוא מקיים את כל התנאים הבאים:

  • אין שלושה קודקודים הנמצאים על ישר אחד.
  • צלעות שאינן סמוכות אינן חולקות נקודה משותפת.
  • כל זווית פנימית של המרובע קטנה ממש מ-$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.