| SanSi Cup 2026 Qualification round |
|---|
| Finished |
Pacha is tired of teaching geometry to the team "Gatos Coprimos", and he knows they did not check or solve the problems he left them, so here is one more.

Test case 1: the parallelogram of the first case of the example.
Given two vectors $$$A = (x_1, y_1)$$$ and $$$B = (x_2, y_2)$$$ with origin at $$$(0, 0)$$$, compute the area of the parallelogram they form: the one with vertices $$$(0, 0)$$$, $$$A$$$, $$$A + B$$$ and $$$B$$$. If the vectors are parallel, or one of them is $$$(0, 0)$$$, the parallelogram flattens and its area is $$$0$$$.
The first line contains an integer $$$t$$$, the number of test cases.
Each of the following $$$t$$$ lines contains four integers $$$x_1$$$, $$$y_1$$$, $$$x_2$$$ and $$$y_2$$$: the coordinates of $$$A$$$ and of $$$B$$$.
Constraints
For each case, print on one line the area of the parallelogram. It can be shown that it is always an integer.
Warning: the answer may not fit in a 32-bit integer.
3 3 1 1 2 1 2 3 1 2 4 1 2
5 5 0
1 100000 100000 -100000 100000
20000000000
Example 1. In the first case, $$$A = (3, 1)$$$ and $$$B = (1, 2)$$$ form the parallelogram in the figure, with area $$$5$$$. In the second, the same vectors in the other order form the same parallelogram. In the third, $$$B = (1, 2)$$$ is half of $$$A = (2, 4)$$$, so both vectors lie on the same line and the area is $$$0$$$.
Example 2. In this case the coordinates are maximal, and the area is $$$2 \cdot 10^{10}$$$.
| Name |
|---|


