GO Solution For UVa 10310 - Dog and Gopher. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

A large field has a gopher and a dog. The dog wants to eat the gopher, while the gopher wants to run to safety through one of several gopher holes dug in the surface of the field.

Neither the dog nor the gopher is a math major; however, neither is entirely stupid. The gopher decides on a particular

...

You can find the full details of the problem Dog and Gopher at UVa Online Judge

Sample Input

1 1.000 1.000 2.000 2.000
1.500 1.500

2 2.000 2.000 1.000 1.000
1.500 1.500
2.500 2.500

Sample Output

The gopher cannot escape.
The gopher can escape through the hole at (2.500,2.500).

Solution: Please check the main.go snippet for the solution.

Solution originally posted at: Github by @codingsince1985