Fix SRM 146, Div 2, Problem RectangularGrid

- previously without system test checks
- w+1-i is the correct count of rectangles with width i
- h+1-j is the correct count of rectangles with height j