题目描述
Problem Description
Given the coordinates of the three vertices of a triangle and the coordinates of $N$ points, calculate the area of the triangle and determine how many of these $N$ points lie inside the triangle (including the boundary).
Input Format
The first three lines, each containing two integers, represent the coordinates of a vertex of the triangle.
The next line contains an integer $N$.
The following $N$ lines, each containing two integers $x_i, y_i$, represent the coordinates of the $i$-th point.
Output Format
The first line contains a real number, representing the area of the triangle, rounded to one decimal place.
The second line contains an integer, representing the number of points inside the triangle and on its boundary.
Sample Input and Output
Sample Input #1
1 1
5 1
3 3
4
3 1
3 2
3 3
3 4
Sample Output #1
4.0
3
Sample Input #2
3 2
5 4
1 6
3
2 4
3 5
4 3
Sample Output #2
6.0
3
Sample Input #3
2 6
5 1
7 8
5
1 4
3 5
6 4
6 5
4 7
Sample Output #3
15.5
2
Notes
For $100\%$ of the data, $1 \le N \le 100$, and all coordinates $x, y$ are positive integers less than $10^3$.
Hint: The formula for the area of a triangle with vertices at $(x_A, y_A)$, $(x_B, y_B)$, and $(x_C, y_C)$ is as follows:
$\dfrac{|x_A(y_B-y_C)+x_B(y_C-y_A)+x_C(y_A-y_B)|}{2}$
This problem is scored according to the original competition settings, with a maximum of $30$ points.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分