| Codeforces Round 1132 (Div. 2) |
|---|
| Finished |
— No, I did not know that. Is that true?
This is the easy version of the problem. The difference between the versions is that in this version, in one operation, the coordinate of a point changes by exactly $$$1$$$.
Unemployed $$$\ast$$$ Angel places three points $$$A$$$, $$$B$$$, and $$$C$$$ at the origin.
You must perform exactly $$$n$$$ operations of the following type: choose one of these points and increase or decrease one of its coordinates by $$$1$$$. In other words, if the chosen point has coordinates $$$(x, y)$$$, in one operation you may move it to $$$(x + 1, y)$$$, $$$(x - 1, y)$$$, $$$(x, y + 1)$$$, or $$$(x, y - 1)$$$.
Unemployed $$$\ast$$$ Angel asks you to find the maximum doubled area of triangle $$$ABC$$$ after all operations are performed. As she is your idol, you cannot refuse her.
Since Unemployed $$$\ast$$$ Angel is very smart, she can show that the value of interest is always an integer.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 1000$$$). The description of the test cases follows.
The only line of each test case contains one integer $$$n$$$ ($$$2 \le n \le 1000$$$) — the number of operations.
For each test case, output one integer — the maximum doubled area of triangle $$$ABC$$$.
5251543769
1656462147840
In the first test case, increase the $$$x$$$-coordinate of $$$B$$$ by $$$1$$$, then increase the $$$y$$$-coordinate of $$$C$$$ by $$$1$$$. After these $$$2$$$ operations, the points are $$$A = (0, 0)$$$, $$$B = (1, 0)$$$, and $$$C = (0, 1)$$$. The doubled area of the resulting triangle is $$$1$$$.
![]() |
In the second test case, decrease the $$$x$$$-coordinate of $$$A$$$ by $$$1$$$, then increase the $$$x$$$-coordinate of $$$B$$$ by $$$1$$$ twice, and finally increase the $$$y$$$-coordinate of $$$C$$$ by $$$1$$$ twice. After these $$$5$$$ operations, the points are $$$A = (-1, 0)$$$, $$$B = (2, 0)$$$, and $$$C = (0, 2)$$$. The doubled area of the resulting triangle is $$$6$$$.
![]() |
| Name |
|---|


