Solutions for Google Hash Code 2021 Practice- and Qualification rounds.
- JDK 15
Input files are read from stdin
.
- Problem statement: Link
- Approach: Naive greedy approach
Dataset | Score | Time |
---|---|---|
A | 61 | 0.0008 seconds |
B | 11,908 | 0.03 seconds |
C | 705,442,517 | 11.43 seconds |
D | 7,747,922 | 52.14 seconds |
E | 10,674,218 | 57.99 seconds |
Total | 723,876,626 | – |
- Problem statement: Link
- Approach: For the qualification round, we unfortunately did not get beyond the most trivial approach. Every schedule is a uniform distribution with the only optimization being that unused streets are skipped.
Dataset | Score | Time |
---|---|---|
A | 2002 | 0.01 seconds |
B | 4,566,536 | 0.05 seconds |
C | 1,298,772 | 0.14 seconds |
D | 1,036,060 | 0.27 seconds |
E | 684,007 | 0.04 seconds |
F | 1,238,720 | 0.12 seconds |
Total | 8,826,097 | – |