Orig Description
Score : 200 points
Problem StatementTwo children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second.
The other child is now at coordinate B, and she can travel the distance of W per second.
He can catch her when his coordinate is the same as hers.
Determine whether he can catch her within T seconds (including exactly T seconds later).
We assume that both children move optimally.
Constraints
-10^9 \leq A,B \leq 10^9
1 \leq V,W \leq 10^9
1 \leq T \leq 10^9
A \neq B
All values in input are integers.
InputInput is given from Standard Input in the following format:
A V
B W
T
OutputIf "it" can catch the other child, print YES; otherwise, print NO.
Sample Input 11 2
3 1
3
Sample Output 1YES
Sample Input 21 2
3 2
3
Sample Output 2NO
Sample Input 31 2
3 3
3
Sample Output 3NO
Extracted Specification
An integer X1 (-10^9 ≤ X1 ≤ 10^9).
An integer Y1 (1 ≤ Y1 ≤ 10^9).
An integer X2 (-10^9 ≤ X2 ≤ 10^9).
An integer Y2 (1 ≤ Y2 ≤ 10^9).
An integer Z (1 ≤ Z ≤ 10^9).
### Example Input:
```
11 2
3 1
3
```
### Function Signature:
Write a function f(X1, Y1, X2, Y2, Z) that takes in the input.
```python
def f(X1: int, Y1: int, X2: int, Y2: int, Z: int):
'''
X1: an integer
Y1: an integer
X2: an integer
Y2: an integer
Z: an integer
'''
```
Test Case Generator
Sure, I can help you write a test case generator for the given problem statement. Here is the Python code for the test case generator:
```python
import random
def tcgen():
A = random.randint(-10**9, 10**9)
# Ensure B is different from A
B = A
while B == A:
B = random.randint(-10**9, 10**9)
V = random.randint(1, 10**9)
W = random.randint(1, 10**9)
T = random.randint(1, 10**9)
return A, V, B, W, T
# Example of how to use the generator
A, V, B, W, T = tcgen()
print(f"{A} {V}")
print(f"{B} {W}")
print(f"{T}")
```
### Explanation:
1. **A and B**: Random integers are generated between -10^9 and 10^9 for both A and B, ensuring that they are different.
2. **V and W**: Random integers are generated between 1 and 10^9 for V and W.
3. **T**: A random integer is generated between 1 and 10^9 for T.
This generator ensures that the constraints are met and produces valid input for the problem. The `while` loop ensures that A and B are different. Here is how you can use the generator and get an example of the input format.
Extract Arguments
def extract_arguments(fh):
A, V = map(int, fh.readline().strip().split())
B, W = map(int, fh.readline().strip().split())
T = int(fh.readline().strip())
return A, V, B, W, T