Hi, daft_wullie.
I think there is not a version of the problem in English, but can be described as follows:
One of the lesser known works of Colombian writer Gabriel García Márquez is "Los buses Cartagena", which describes the story of a small Colombian city bus company, mainly because of breakage problems of the bus for Overcharge, intended to reduce the number of passengers carried on each trip Cartagena to Medellin for the same fixed number. At the same time, the company wanted to continue to meet all requests satisfactorily. Each bus has a departure time, and each passenger has a list of times where I would like to travel. Passengers just want to go to Medellin, ie no passenger plans to travel twice on the same day.
The task is to determine the minimum number of passengers to be carried on each trip respecting the restriction that all passengers must be met.
Input
The first line of a case of test will have an integer T indicating the number of instances. The first line in each instance contains two integers N and M (1 ≤ N, M ≤ 100). Each of the next M lines has the departure time of the bus. The time is in format hh:mm (00 ≤ hh ≤ 23, 00 ≤ mm ≤ 59 and mm and hh have two digits). Each of the following N lines contains a list of times that each passenger can travel. The list of times is in the following format: an integer K (1 ≤ K ≤ M) followed by K times, also in hh:mm format, separated by a blank space.
Output
For each instance prints a line containing the minimum number of passengers to be transported.