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

Problem Description

Consider a n × n chessboard. The term block(r1, c1, r2, c2) denotes the rectangular subset of squares defined by the intersection of rows {r1, r1 + 1, . . . , r2} and columns {c1, c1 + 1, . . . , c2}.

There are several occupied blocks on the board. We are interested in the largest block (in the sen

...

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

Sample Input

3
10
3
2 2 5 3
8 3 9 7
3 6 3 8
20
1
1 1 1 1
10
2
5 1 5 10
1 5 10 5

Sample Output

28
380
25

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

Solution originally posted at: Github by @codingsince1985