Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 1.74 KB

File metadata and controls

42 lines (27 loc) · 1.74 KB

Solution to the 2018 Google Hash Code online qualification round (Javascript)

#hashcodesolved

Problem Statement

Algorithm

While there are unassigned rides, our algorithm takes a vehicle that has below the average steps (distance travelled) and assigns it the best possible ride for that vehicle, using this formula (you can try coming up with a better one):

Usage

0 dependencies. All you need is node.js installed.

node index.js (a | b | c | d | e)

We also built an engine that allows you to get immediate feedback in the console on how well you have done. It calculates the score for you and eliminates the need to submit your solution each time.

Score

Input Points
A - example 10
B - should be easy 176,877
C - no hurry 15,803,878
D - metropolis 10,677,057
E - high bonus 21,461,975
   Total score: 48,119,797 (402/2386 in the extended round)

Authors:

Georgi Georgiev @ggeorgievx

Lazar Malezanov @lazar-malezanov