#P1355. 神秘大三角

    ID: 352 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 5 上传者: 标签>数学计算几何福建省历届夏令营向量叉积

神秘大三角

Description

Determine the positional relationship between a point and a given triangle.

Input Format

  • The first three lines, each contains a coordinate, representing the three vertices of the triangle.
  • The fourth line contains the coordinate of a point. Determine the positional relationship between this point and the triangle formed by the previous three points.
  • All coordinate values are integers.

Output Format

  • If the point is inside the triangle (excluding the boundary), output 11.
  • If the point is outside the triangle (excluding the boundary), output 22.
  • If the point is on the boundary of the triangle (excluding vertices), output 33.
  • If the point is on a vertex of the triangle, output 44.
(0,0)
(3,0)
(0,3)
(1,1)

1

Hint

Constraints

For 100%100\% testdata, 0xi,yi1000 \le x_i, y_i \le 100.

Translated by ChatGPT 5