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

Problem Description

In some tests there appears the problem of finding the number of rectangles (or circles, or triangles, ...) of different sizes in a figure. We consider the problem of counting rectangles (including squares) in a rectangular board.

Given a rectangular board with n rows and m columns, with valid poss

...

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

Sample Input

2
2
11
01
4
3
110
101
111
011
0

Sample Output

5
22

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

Solution originally posted at: Github by @codingsince1985