google-code-jam-2017
google-code-jam-2017 copied to clipboard
My solutions to Google Code Jam 2017 problems
Google Code Jam 2017
This repository contains my solutions to the problems from Google Code Jam 2017 and Distributed Google Code Jam 2017. 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. Oversized Pancake Flipper (
oversized-pancake-flipper
) - ✓ B. Tidy Numbers (
tidy-numbers
) - ✓ C. Bathroom Stalls (
bathroom-stalls
) - ✓ D. Fashion Show (
fashion-show
)
Round 1A
- ✓ A. Alphabet Cake (
alphabet-cake
) - ✓ B. Ratatouille (
ratatouille
)
Round 1B
- ✓ A. Steed 2: Cruise Control (
speed-2-cruise-control
) - ✓ B. Stable Neigh-bors (
stable-neigh-bors
) - ✓ C. Pony Express (
pony-express
)
Round 1C
- ✓ A. Ample Syrup (
ample-syrup
) - ✓ B. Parenting Partnering (
parenting-partnering
) - ✓ C. Core Training (
core-training
)
Round 2
- ✓ A. Fresh Chocolate (
fresh-chocolate
) - ✗ B. Roller Coaster Scheduling (
roller-coaster-scheduling
)
Distributed Round 1
- ✓ B. Pancakes (
pancakes
) - ✓ C. Weird Editor (
weird_editor
) - ✓ D. Todd and Steven (
todd_and_steven
) - ✓ E. Query of Death (
query_of_death
)