google-code-jam-2016
google-code-jam-2016 copied to clipboard
My solutions to Google Code Jam 2016 problems
Google Code Jam 2016
This repository contains my solutions to the problems from Google Code Jam 2016 and Distributed Google Code Jam 2016. These solutions are provided "as is" - I give no guarantees that they will work as expected.
Instructions
You can compile all Google Code Jam problems by issuing the following command:
$ make
If you want to compile only a specific problem, issue the following command, replacing <problem_id>
with the section and identifier of the problem you want to compile (see section "Problems Solved" for the list of possible identifiers):
$ make <problem_id>
Running a compiled problem is just a matter of executing a command similar to the next one, replacing <problem_id>
with the identifier of the desired problem:
$ ./<problem_id>
Unless stated otherwise, every problem in this repository reads from the standard input and writes to the standard output.
Distributed Google Code Jam problems should be compiled and run using the local testing tool described in the guide. An example would be:
$ dcj test --source <round_name>/<problem_id>.cpp --nodes <number_of_nodes>
You'll need to have an input header file with the name <problem_id>.h
in the same directory as the source file. You can download sample inputs from each problem's page.
Problems Solved
The following is the list of the problems solved. Each problem identifier is specified between round brackets. Problems marked with ✓ are done, while problems with ✗ are not complete or aren't efficient enough for the problem's limits.
Qualification Round
- ✓ A: Counting Sheep (
counting-sheep
) - ✓ B: Revenge of the Pancakes (
revenge-of-the-pancakes
) - ✓ C: Coin Jam (
coin-jam
) - ✓ D: Fractiles (
fractiles
)
Round 1A
- ✓ A: The Last Word (
the-last-word
) - ✓ B: Rank and File (
rank-and-file
) - ✓ C: BFFs (
bffs
)
Round 1B
- ✓ A: Getting the Digits (
getting-the-digits
) - ✓ B: Close Match (
close-match
) - ✓ C: Technobabble (
technobabble
)
Round 1C
- ✓ A: Senate Evacuation (
senate-evacuation
) - ✓ B: Slides! (
slides
) - ✓ C: Fashion Police (
fashion-police
)
Round 2
- ✓ A: Rather Perplexing Showdown (
rather-perplexing-showdown
) - ✓ B: Red Tape Committtee (
red-tape-committee
)
Distributed Round 1
- ✓ B: Oops (
oops
) - ✓ C: Remarkably Parallel Scenario (
rps
) - ✓ D: Rearranging Crates (
crates
) - ✓ E: Winning Move (
winning_move
)
Distributed Round 2
- ✓ B: ...we did it again (
again
) - ✓ C: Lisp++ (
lisp_plus_plus
) - ✗ E: Gas Stations (
gas_stations
)