This repository contains my solutions to the problems from Google Code Jam 2018 and Distributed Google Code Jam 2018. These solutions are provided "as is" - I give no guarantees that they will work as expected.
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.
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.
- ✓ A. Number Guessing (
number-guessing
) - ✓ B. Senate Evacuation (
senate-evacuation
) - ✓ C. Steed 2: Cruise Control (
steed2-cruise-control
) - ✓ D. Bathroom Stalls (
bathroom-stalls
)
- ✓ A. Saving The Universe Again (
saving-the-universe-again
) - ✓ B. Trouble Sort (
trouble-sort
) - ✓ C. Go, Gopher! (
go-gopher
) - ✓ D. Cubic UFO (
cubic-ufo
)
- ✓ A. Waffle Choppers (
waffle-choppers
) - ✓ B. Bit Party (
bit-party
) - ✓ C. Edgy Baking (
edgy-baking
)
- ✓ A. Rounding Error (
rounding-error
) - ✓ B. Mysterious Road Signs (
mysterious-road-signs
) - ✓ C. Transmutation (
transmutation
)
- ✓ A. A Whole New Word (
a-whole-new-word
) - ✓ B. Lollipop Shop (
lollipop-shop
) - ✓ C. Ant Stack (
ant-stack
)
- ✓ A. Falling Balls (
falling-balls
) - ✓ B. Graceful Chainsaw Jugglers (
graceful-chainsaw-jugglers
) - ✓ C. Costume Change (
costume-change
) - ✓ D. Gridception (
gridception
)