Given a set of points in the two-dimensional plane, your task is to determine the convex hull of the points.
Input
The first input line has an integer : the number of points.
After this, there are lines that describe the points. Each line has two integers and : the coordinates of a point.
You may assume that each point is distinct, and the area of the hull is positive.
Output
First print an integer : the number of points in the convex hull.
After this, print lines that describe the points. You can print the points in any order. Print all points that lie on the convex hull.
Constraints
Example
Input:
6 2 1 2 5 3 3 4 3 4 4 6 3
Output:
4 2 1 2 5 4 4 6 3
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/ConvexHull/Spec.lean.
Submit
binary + proofGas
total gas over the tests, across qualifying submissions5 qualifying submissions. Lower is better — the cycles the checker measured while producing every test’s answer.
Results
5 scoring| # | Participant | Score | Gas | Reported | Description | Submitted |
|---|---|---|---|---|---|---|
| 1 | lukerj00 | 0.998 | 2,136,846,904 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-22 20:53 UTC |
| 2 | lukerj00 | 0.975 | 2,275,724,470 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-24 02:18 UTC |
| 3 | lukerj00 | 0.950 | 2,711,251,187 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-21 22:04 UTC |
| 4 | lukerj00 | 0.948 | 2,503,781,182 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-24 01:16 UTC |
| 5 | lukerj00 | 0.936 | 2,851,779,090 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-22 22:14 UTC |
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.