Holes -- Problem I (15 points)
The input file for this problem is called PROBLEMI.DAT. The first line on this file contains four numbers, giving the values for m, n, p and q respectively, separated by one or more blanks. None of these numbers will be greater than 20 or less than 1. After this there will be zero or more lines giving the numbers of the squares which are occupied. None of these numbers will exceed mn. This list of numbers will be terminated by a line containing a single zero. The file will be terminated by a line giving four zero values to m, n, p and q.
Output, which must be written to standard output (the screen), must be the number of ways of placing the pxq block, leftjustified on its line. There will be one output line for each problem description in the input.
5 4 1 2 3 5 10 11 14 18 19 0 0 0 0 0