this is a brief explanation on how my code for hashcode 2018 works. my team sent two solutions in the competition, the first solution was an easy greedy solution that assigns every vehicle to the nearest ride that has not been made yet. It is very basic yet it scored 20 million as an overall on the given datasets.
the elegant solution that we were not able to finish it on time (we finished it but it was full of bugs) scored 47.5 million in the extended version of the contest. In this solution we decided to sort the rides according to the finish time and then the start time, after that we characterized every vehicle with the place and time, so when we iterate on the rides we are going to search for the nearest vehicle to the start point of this ride in terms of time and place and we are going to assign this ride to this vehicle, some tweaks have been done regarding every dataset, e.g. the basic greedy solution works much better with the dataset no_hurry due to the large time range in every ride in the dataset, one important tweak that improved the solution alot in the last dataset high_bonus, is taking the ride iff the vehicle is going to be assigned on time, so that we can assign the ride with the earned bonus.