Skip to content

Program that takes as input the location of m commuters and n cabs and a destination location, and outputs optimised cab routes for picking up all commuters (on a shared basis) and dropping them off at the destination.

Notifications You must be signed in to change notification settings

D-Ne0/cabs_n_commuters

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Problem

Write a program that takes an input file as input containing the location of m commuters and n cabs and a destination location, and outputs optimised cab routes for picking up all commuters (on a shared basis) and dropping them off at the destination.

Solution

Checkout the solution here: https://github.com/D-Ne0/cabs_n_commuters/wiki/Cabs-n-Commuters-Solution

How to run the program

python run.py <input_file>

If <input_file> is not given then sample_inputs/sample_input_0.txt is used

Input File Format

First line contains two integers(m and n space separated), indicating number of commuters and cabs. Next m lines contain commuter locations. Next n lines contain cab locations. Last line contains the destination location.
Locations are in format: x,y

About

Program that takes as input the location of m commuters and n cabs and a destination location, and outputs optimised cab routes for picking up all commuters (on a shared basis) and dropping them off at the destination.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages