
1432: Delivery Robot
[命题人 : 外部导入]
题目描述
A delivery robot is an autonomous machine designed to provide delivery services. On many campuses, these robots can offer significant convenience to students.
A delivery robot typically integrates various assistance systems, such as collision avoidance systems. These systems should enable the robot to automatically avoid both static obstacles and other robots. Due to the non-immediate nature of velocity control, collision avoidance systems typically allocate a time interval . If a collision is predicted to occur within at the current velocity, the system adjusts the robot's velocity accordingly, including its speed and direction.
We assume that the velocity can change instantly at the beginning of but remains constant throughout . In this problem, we set , meaning you only need to consider the first from the initial position, without considering the subsequent process.
We envision the delivery robot as a moving convex polygon on a two-dimensional plane with vertices, with its initial vertex coordinates given. In addition, there is a stationary convex polygonal obstacle on the plane with vertices, and its vertex coordinates are also given.
As a developer of the collision avoidance system, you want to conduct tests, each time setting an initial velocity vector for the robot, and the robot will start from the given initial position. According to the principle of the collision avoidance system, if the robot will collide with the obstacle after traveling for at the current velocity, the robot's velocity should be changed immediately at the beginning, that is, should be modified to .
Without an upper limit on speed, it is evident that a suitable must exist to prevent a collision within . Depending on the situation, different strategies can be used to select . The objective of this problem is to choose a that minimizes the magnitude of the difference between and , i.e. . The magnitude of a vector is defined as .
A delivery robot typically integrates various assistance systems, such as collision avoidance systems. These systems should enable the robot to automatically avoid both static obstacles and other robots. Due to the non-immediate nature of velocity control, collision avoidance systems typically allocate a time interval
We assume that the velocity can change instantly at the beginning of
We envision the delivery robot as a moving convex polygon on a two-dimensional plane with
As a developer of the collision avoidance system, you want to conduct
Without an upper limit on speed, it is evident that a suitable
输入
The first line contains an integer ( ), indicating the number of test cases.
The first line of each test case contains three integers ( ), indicating the number of vertices of the delivery robot and the obstacle, respectively.
Each of the next lines contains two integers ( ), indicating the coordinates of a vertex of the delivery robot. The coordinates are given in counter-clockwise order.
Each of the next lines contains two integers ( ), indicating the coordinates of a vertex of the obstacle. The coordinates are given in counter-clockwise order. It is guaranteed that the delivery robot and the obstacle are strictly disjoint.
Each of the next lines contains two integers ( ), indicating the initial velocity vector of the delivery robot.
It is guaranteed that and and over all test cases.
The first line of each test case contains three integers
Each of the next
Each of the next
Each of the next
It is guaranteed that
输出
For each test, output the [b]square[/b] of the minimum magnitude of , i.e. , in a single line. You should output the answer as an irreducible fraction , where , are integers and .
样例输入 Copy
1
4 3 3
-1 -1
-2 -1
-2 -2
-1 -2
0 1
1 0
2 2
1 1
2 2
3 3
样例输出 Copy
0/1
1/2
18/5