## Task B-1.4.

The set of points $(x, y)$ in the coordinate plane for which

$$
|x| \leqslant a, a \in \mathbb{Z}, a>0, x+y \geqslant 0,|1-y| \leqslant 2
$$

contains 2015 points with integer coordinates. Determine the number $a$ and the area of the given set of points.
## Solution.

From $|x| \leqslant a$ it follows that $-a \leqslant x \leqslant a$, and from $|1-y| \leqslant 2$ it follows that

$$
\begin{gathered}
1-y \leqslant 2 \text { and } 1-y \geqslant-2 \\
y \geqslant-1 \text { and } y \leqslant 3
\end{gathered}
$$

We obtain the set of points $(x, y)$ that lie

between the lines $y=-1, y=3$,

between the lines $x=-a$ and $x=a$, and finally, due to $y \geqslant-x$,

above the bisector of the second and fourth quadrants.

The number $a>3$ because otherwise there would be fewer than 2015 (more precisely $\leqslant 25$) points with integer coordinates within the given set of points.

![](https://cdn.mathpix.com/cropped/2024_05_30_1020492bf6e1d2c949fdg-03.jpg?height=491&width=897&top_left_y=1419&top_left_x=585)

The obtained shape is a trapezoid $A B C D$ with bases of lengths $a+3$ and $a-1$, and height $v=4$. Let's count the points by segments parallel to the $x$-axis within the obtained trapezoid.

$$
\begin{aligned}
2015 & =a+4+a+3+a+2+a+1+a \\
2015 & =5 a+10, \text { from which } \\
403 & =a+2 \\
a & =401
\end{aligned}
$$

The area of the obtained trapezoid is

$$
P=\frac{(a-1)+(a+3)}{2} \cdot 4=(400+404) \cdot 2=1608 \text { square units. }
$$