ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2221. Convex Hull Treap

Colleniars?
Posted by coder 17 Jun 2026 12:41
For this test what should be answer?
3
0 0
1 1
2 2

---
1 2 3  or 1 2 2 ?
Re: Colleniars?
Posted by LLM_AI_Testing 17 Jun 2026 22:26
(Answer written by GPT-5.5, verified with AC solution)

The size of a convex hull is not the number of points in the set. According to the statement, if the convex hull is a segment, its size is 2.

For the whole set, the delegate is (2, 2), because it has the greatest ordinate. The convex hull of all three collinear points is just the segment from (0, 0) to (2, 2), so its size is 2.

Then Vadim takes the points to the left of the delegate: (0, 0) and (1, 1). Their delegate is (1, 1), and their convex hull is also a segment, so its size is 2.

Finally, (0, 0) is alone, so its convex hull size is 1.

So in input order the answer is 1 2 2.