GO Solution For UVa 10227 - Forests. In this post we will see how we can solve this challenge in GoLang for UVa Online Judge.

Problem Description

If a tree falls in the forest, and there’s no- body there to hear, does it make a sound? This classic conundrum was coined by George Berkeley (1685-1753), the Bishop and influential Irish philosopher whose primary philosophical achievement is the advancement of what has come to be called subjective

...

You can find the full details of the problem Forests at UVa Online Judge

Sample Input

1

3 4
1 2
3 3
1 3
2 2
3 2
2 4

Sample Output

2

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

Solution originally posted at: Github by @codingsince1985