Problem:
Score : 200 points

Problem Statement

Two 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.

Input

Input is given from Standard Input in the following format:

A V
B W
T

Output

If "it" can catch the other child, print YES; otherwise, print NO.

Sample Input 1

1 2
3 1
3

Sample Output 1

YES

Sample Input 2

1 2
3 2
3

Sample Output 2

NO

Sample Input 3

1 2
3 3
3

Sample Output 3

NO

Solution in Go (1.14.1) (judge verdict: Wrong Answer)

package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewReaderSize(os.Stdin, 1024*1024*10)

func main() {
	list1 := getStdinIntArr64()
	list2 := getStdinIntArr64()
	list3 := getStdinIntArr64()
	A := list1[0]
	V := list1[1]
	B := list2[0]
	W := list2[1]
	T := list3[0]

	var a uint64 = 0
	var b uint64 = 0
	var v uint64 = 0
	var w uint64 = 0
	var t uint64 = 0
	a = uint64(A)
	b = uint64(B)
	v = uint64(V)
	w = uint64(W)
	t = uint64(T)

	/*
		if A < B {
			v = V
			w = W
		} else {
			v = -V
			w = -W
		}
	*/
	var acnt uint64 = 0
	var bcnt uint64 = 0
	var i1 uint64 = 0
	var i2 uint64 = 0
	//var l uint64 = 0
	//var cnt1 uint64 = 0
	//var cnt2 uint64 = 0
	//	l = lcm(v, w)
	//cnt1 = l / v
	//cnt2 = l / w

	if A < B {
		for i1 < t && i2 < t {
			acnt += v
			bcnt += w
			if a+acnt == b+bcnt {
				fmt.Printf("YES\n")
				return
			}
			i1++
			i2++
		}
	} else {
		b = a - b
		a = 0
		for i1 < t && i2 < t {
			acnt += v
			bcnt += w
			if a+acnt == b+bcnt {
				fmt.Printf("YES\n")
				return
			}
			i1++
			i2++
		}
	}

	//l := lcm(V, W)
	/*
		if A+T* > 0 {
			fmt.Printf("Yes\n")
			return
		}
	*/
	fmt.Printf("NO\n")
}

func getStdin() string {
	return readLine()
}
func getStdinInt() int {
	str := getStdin()
	rtn, _ := strconv.Atoi(str)
	return rtn
}
func getStdinIntArr() []int {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.Atoi(val)
	}
	return rtn
}

func getStdinIntArr64() []int64 {
	str := getStdin()
	list := strings.Split(str, " ")
	rtn := make([]int64, len(list))
	for idx, val := range list {
		rtn[idx], _ = strconv.ParseInt(val, 10, 64)
	}
	return rtn
}

func readLine() string {
	buf := make([]byte, 0, 0)
	for {
		l, p, e := sc.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func gcd(a, b uint64) uint64 {
	if b == 0 {
		return a
	}
	return gcd(b, a%b)
}
func lcm(a, b uint64) uint64 {
	return a * b / gcd(a, b)
}