Problem F: Beam alignment A certain company makes steel beams which have small holes predrilled at regular intervals in the center of the beam through which things like electrical wires can go. In new beams these holes have covers but the covers are easily knocked off when necessary at a construction site. Another company has some used beams each of which has one or more of the hole covers already knocked off. We want to align the beams so that as many holes as possible line up. Our contest software this year requires all data sets to be in one file (F.in for this problem). You should have a copy of F.in in the directory with your program. However, your program should take input from System.in/stdin/cin. This will be connected to F.in for you. The public F.in has 8 lines: 1 2 4 6 2 3 6 9 3 6 7 11 4 7 11 12 1 3 6 9 2 4 7 10 15 3 5 8 11 There are two data sets here separated by a blank line. The judges have different data. It consists of one or more data sets separated by blank lines. Each data set has one or more lines. Each line has one or more integers indicating which hole covers have been knocked off for one beam. These integers are non-negative and in ascending order. With the second data set above we see that by shifting the first beam over two units and the second beam over one unit we can get 4 holes to line up. With the first data set no matter how we align the beams we can get at most one hole to line up in all 4 beams. The output should contain one integer for each data set indicating the maximum number of holes which can be made to line up. For the data above the output should be (on one line): 1 4 Extra blanks will be accepted. Note programs are not allowed to take more than 120 seconds to execute.