Source: IMO-2025-P1
Category: Existence and Construction

Problem:
A line in the plane is called *sunny* if it is not parallel to any of the $x$-axis, the $y$-axis, or the line $x+y=0$.

Let $n \ge 3$ be a given integer. Determine all nonnegative integers $k$ such that there exist $n$ distinct lines in the plane satisfying both of the following:

- for all positive integers $a$ and $b$ with $a+b\le n+1$, the point $(a,b)$ lies on at least one of the lines;
- exactly $k$ of the $n$ lines are sunny.

Solution:
We claim that the only possible numbers of sunny lines are $k \in \{0, 1, 3\}$.

We view the set of lattice points $(a, b)$ with $a, b > 0$ and $a + b \le n + 1$ as a triangular grid of points. We define a *long line* to be one of the three boundary lines of this grid, which are the lines passing through exactly $n$ grid points. Notice that each long line is not a sunny line, as it is parallel to either the $x$-axis, the $y$-axis, or the line $x + y = 0$.

The key claim is that if $n \ge 4$, then any set of $n$ distinct lines covering all the required grid points must contain at least one long line.

Proof of the claim: Consider the $3(n - 1)$ points on the outer edge of the triangular grid. If no long line were present in our set of $n$ covering lines, then each of the $n$ lines would intersect the boundary of the triangular grid in at most two points, meaning each line could pass through at most two edge points. Since the $n$ lines must cover all $3(n - 1)$ edge points, we would obtain the inequality
\[
2n \ge 3(n - 1).
\]
Solving this inequality yields $n \le 3$, which contradicts our assumption that $n \ge 4$. Thus, the claim is proven.

Therefore, for any configuration with $n \ge 4$, at least one long line must exist among the $n$ lines. We may delete this long line and remove the $n$ grid points it covers. The remaining grid points form a smaller triangular grid corresponding to size $n - 1$. Since the deleted long line is not sunny, this reduction from size $n$ to size $n - 1$ does not change the number of sunny lines in the configuration. By repeating this process, we can continually reduce the configuration until we reach the base case of $n = 3$. Conversely, once a valid configuration of lines is known for a smaller value of $n$, we can increase $n$ by adding a long line (which covers the new boundary points and is not sunny), maintaining the exact same number of sunny lines. Consequently, the possible counts of sunny lines for any $n \ge 3$ are exactly those that arise in the base case $n = 3$.

We now classify all possible coverings of the six grid points in the $n = 3$ triangular grid by exactly three lines.

Case 1: A long line is present. This long line covers exactly three grid points. The remaining three grid points must be covered by the remaining two lines. By the Pigeonhole Principle, one of these two remaining lines must pass through at least two of the remaining three points and hence is not sunny (since any line passing through two points of the remaining grid points in this configuration is necessarily parallel to a boundary line). The third and final line may or may not be sunny. Therefore, in this case, the possible numbers of sunny lines are $0$ or $1$.

Case 2: No long line is present. Then each of the three lines can pass through at most two grid points. Since there are six grid points in total and only three lines, each line must in fact pass through exactly two points. The only possible configuration is the symmetric one in which all three lines are sunny. Hence this case gives exactly $3$ sunny lines.

Thus the only possible values of $k$ are
\[
0, \ 1, \ 3.
\]

It remains to see that all three values are achievable. The $n = 3$ case above already realizes these possibilities, and by adding long lines we obtain constructions for every larger $n$. Therefore, the answer is precisely $k \in \{0, 1, 3\}$.

Answer: $k \in \{0,1,3\}$

Grading guidelines:
(Partial) 1. Verified by explicit configurations (at least for n=3) that k=0, k=1, and/or k=3 are attainable, and explained how to extend a valid configuration from n to n+1 by adding a non-sunny boundary (“long”) line. 2. Defined the three boundary long lines of the triangular grid and observed they are exactly the non-sunny directions (parallel to x-axis, y-axis, or x+y=0), and that deleting such a long line reduces the problem from size n to size n−1 without changing k. 3. Proved the key counting inequality on boundary points for n≥4: if no long line is used then each line meets the outer edge in at most 2 grid points, giving 2n≥3(n−1) and hence a contradiction for n≥4. (Almost) 1. Proved that for n≥4 any covering must contain a long line and correctly reduced to the base case n=3, and classified the n=3 coverings to get k∈{0,1,3}, but did not explicitly justify the induction step that constructions for n=3 extend to all n (or omitted verifying attainability for all n). 2. Gave a complete reduction to n=3 and correct constructions showing all k∈{0,1,3} occur, but the boundary-point counting argument (or the claim that a non-long line hits at most two boundary points) is not fully justified or has a small logical gap. 3. Solution is almost complete, but made minor mistakes which are not negligible.