* \( (3) \) Let \(n\) and \( m\) be positive integers. An \( n \times m \) rectangle is tiled
* with unit squares. Let \(r(n,m) \) denote the number of rectangles formed by the edge of these
* unit squares. Thus, for example, \(r(2, 1) = 3\). Can you find \( r(11, 12) \)?.
*
* In a row of length n,there are
*
* number rectangle dimensions
* n 1x1
* n-1 2x1
* n-2 3x1
* n-3 4x1
* n-a (a+1)x1
*
* a+1 = n at most, a = n-1
* n-(n-1) nx1
* 1 nx1
*
* Sum is from 1 to n which = n(n + 1)/2
* Because of the way I plan to do the rest of this, I'm going to exclude the 1x1 dimension rectangle. Sum is then from 0 to n-1, so:
* (n-1)((n-1) + 1)/2
* n(n-1)/2
* multiplied by m rows,
* There are,
* mn(n-1)/2 rectangles with a dimension of 1 in the whole rectangle LOOKING ONE WAYS. The rectangle can be flipped and the process repeated, so you must add:
* nm(m-1)/2
*
* Now for 2x2 rectangles.
* They can extend for (n-1) lines across, and (m-1) down. So,
* (n-1)(m-1)
*
* Since 2x2 are a square dimension, like 1x1 we only need to count it going one way.
132 many 1 x 1
241 many 1 x 2
218 many 1 x 3
195 many 1 x 4
172 many 1 x 5
149 many 1 x 6
126 many 1 x 7
103 many 1 x 8
80 many 1 x 9
57 many 1 x 10
34 many 1 x 11
11 many 1 x 12
110 many 2 x 2
199 many 2 x 3
178 many 2 x 4
157 many 2 x 5
136 many 2 x 6
115 many 2 x 7
94 many 2 x 8
73 many 2 x 9
52 many 2 x 10
31 many 2 x 11
10 many 2 x 12
90 many 3 x 3
161 many 3 x 4
142 many 3 x 5
123 many 3 x 6
104 many 3 x 7
85 many 3 x 8
66 many 3 x 9
47 many 3 x 10
28 many 3 x 11
9 many 3 x 12
72 many 4 x 4
127 many 4 x 5
110 many 4 x 6
93 many 4 x 7
76 many 4 x 8
59 many 4 x 9
42 many 4 x 10
25 many 4 x 11
8 many 4 x 12
56 many 5 x 5
97 many 5 x 6
82 many 5 x 7
67 many 5 x 8
52 many 5 x 9
37 many 5 x 10
22 many 5 x 11
7 many 5 x 12
42 many 6 x 6
71 many 6 x 7
58 many 6 x 8
45 many 6 x 9
32 many 6 x 10
19 many 6 x 11
6 many 6 x 12
30 many 7 x 7
49 many 7 x 8
38 many 7 x 9
27 many 7 x 10
16 many 7 x 11
5 many 7 x 12
20 many 8 x 8
31 many 8 x 9
22 many 8 x 10
13 many 8 x 11
4 many 8 x 12
12 many 9 x 9
17 many 9 x 10
10 many 9 x 11
3 many 9 x 12
6 many 10 x 10
7 many 10 x 11
2 many 10 x 12
2 many 11 x 11
1 many 11 x 12
5148