Written in Javascript (NodeJs)
- create random generated sequences that the some of them are less than max pizza slices
- execlude sequences that have sum above max pizza slices and create candidate solutions array
- sort canidate solutions array by their sum in descending order
- most likely your first elemnt in this array have maximum pizza slices
Solution for the Practice Round of Google Hash Code 2020 - Score: 1,505,004,614
File | Score |
---|---|
a_example | 16 points |
b_small | 100 points |
c_medium | 4,500 points |
d_quite_big | 999,999,998 points |
e_also_big | 505,000,000 points |
Total | 1,505,004,614 points |