private static void FindBipartiteGraph(Node[] nodes, int numPeople,
int numTaxis, int speed, int maxTime)
{
for (int taxiNum = numPeople; taxiNum < nodes.Length; taxiNum++)
{
Node taxi = nodes[ taxiNum];
//find all the people it an reach
for (int personNum = 0; personNum < numPeople; personNum++)
{
Node person = nodes[personNum];
//abs(x1-x2) + y1-y2;
int manhatDistance = Math.Abs(taxi.X - person.X)
+ Math.Abs(taxi.Y - person.Y);
double meterDistance = manhatDistance*200;
double timetakes = meterDistance/speed;
if (timetakes <= maxTime)
{
//its able to reach it, so its adjacent
taxi.AdjacentNodes.Add(person);
}
}
}
}