| SanSi Cup 2023 |
|---|
| Finished |
At the top of the Mountain of Wisdom, the sacred triangle remained an unsolved enigma, waiting for a new hero to embark on the quest for its hidden knowledge. The sages of the kingdom, aware of the ancient tradition, proclaimed that the next individual capable of calculating the shaded area under the triangle would be worthy of the treasure the mountain guarded.
Destiny chose a talented young man named Alex, whose mathematical abilities were known throughout the kingdom. Inspired by the legends and challenged by the task that lay before him, Alex ventured to the top of the mountain.
Upon arrival, the sacred triangle stood majestically, casting its shadow in an intricate pattern due to the parallel vertical rays falling from the divine light above. The present sages urged Alex to take on the responsibility of calculating the shaded area, reminding him of the ancient promise of wisdom for whoever could solve the enigma.
Armed with paper, pen, and a sharp mind, Alex immersed himself in the challenging task. The calculations became a mathematical dance, with each number and formula a vital piece to unravel the secret. The shadow danced over the triangle, revealing the complexity of the geometric problem.
Finally, Alex arrived at a solution. The shaded area under the sacred triangle, including the shadow projected by the divine rays, was now recorded on paper. Excitement and anticipation filled the air as the sages watched attentively.
The light above the sacred triangle flickered for a moment, as if acknowledging Alex's achievement. The rock trembled slightly, and a secret door opened, revealing the chamber filled with ancient knowledge.
Alex's story spread throughout the kingdom, inspiring others to face mathematical challenges and uncover the mysteries that the ancient world had left behind. Now, you too have the opportunity to immerse yourself in this challenge. Can you calculate the shaded area and unveil the hidden knowledge behind the sacred triangle? The Mountain of Wisdom awaits your response!
Given three points in the plane, calculate the shaded area that lies beneath the triangle (including the triangle itself).
The first line contains an integer $$$t$$$ $$$(1\le t\le 10^3)-$$$ the number of test cases.
The first line of each test case contains six integers $$$x_1$$$, $$$y_1$$$, $$$x_2$$$, $$$y_2$$$, $$$x_3$$$, $$$y_3$$$ $$$(-1000\le x_1, x_2, x_3 \le 1000 ; 2\le y_1, y_2, y_3 \le 1000)-$$$ the coordinates of the triangle. It is guaranteed that the three points are not collinear and that all coordinates are even numbers.
For each test case, print an integer — the shaded area (it is guaranteed that the answer is always an integer).
3-4 4 4 4 0 80 2 0 4 2 20 4 -4 8 4 8
48 6 64
| Name |
|---|


