Skip to content

zitcher/GoogleHashcode2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GoogleHashcode2020

GoogleHashcode2020 competition

Standing

Team: UrsusArctos
Points: 26,883,109
Global Rank: 370/10,724
US Rank: 22/619

Library Problem

We recognized this problem to be a variation of the NP hard set cover problem. We used a version of the greedy appoximation algorithm for set cover to generate our solution and finished top 5%.

Pizza Problem

We used dynamic programming to tackle this problem. Only 2 rows of the table are necessary for this DP problem (this saves a lot of memory).

    OptimalSlices(p[], m) = max(
        0 if OptimalSlices(p[:-1], m - p[-1]) + p[-1] > m else OptimalSlices(p[:-1], m - p[-1]) + p[-1]
        OptimalSlices(p[:-1], m)
    )

About

GoogleHashcode2020 competition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages