Code Monkey home page Code Monkey logo

2018-hashcode-score's Introduction

Hash Code 2018 Score Calculator

Codacy Badge

TL;DR Compute score for Hash Code 2018 Qualification Round.

Usage

python3 score.py res/a_example.in res/a_example.out

score: 10

python3 score.py res/b_should_be_easy.in res/b_should_be_easy.out --score

score: 176,877 = 169,677 + 7,200 (bonus)

python3 score.py res/e_high_bonus.in res/e_high_bonus.out --score --rides --wait

score: 21,465,945 = 11,588,945 + 9,877,000 (bonus)
wait time: 2,032,526
rides: 10,000 = 9,984 (taken) + 16 (unassigned) 0 (late)
rides: 9,984 (taken) = 9,877 (bonus) + 107 (no bonus)

Output File Checks

The following checks are performed on the output file when the --check option is set

check

  • ride ids are correct
  • rides are assigned only once
  • number of cars
  • number of steps in the simulation

Example

python3 score.py res/b_should_be_easy.in res/b_should_be_easy.out --check

INFO:root:checking vehicles
INFO:root:vehicles: OK
INFO:root:checking ride ids
INFO:root:ride ids: OK
score: 176,877

Unit Tests

see test_score.py

Our Team & Qualification Round

https://hashcode.withgoogle.com/hashcode_2018.html

Team: MetaModHell

Members (listed alphabetically): Karbok, PicoJr

Score: 46,048,775

Rank: 628th World, 81st France

Submissions

Input Score
A-example 10
B-should be easy 176,877
C-no hurry 13,052,303
D-metropolis 11,353,640
E-high bonus 21,465,945

2018-hashcode-score's People

Contributors

codacy-badger avatar picojr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.