Python solutions of Google Code Jam 2015.
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Standing Ovation |
[Python](./Qualification Round/standing-ovation.py) |
O(S) |
O(1) |
Easy |
|
|
B |
Infinite House of Pancakes |
[Python](./Qualification Round/infinite-house-of-pancakes.py) |
O(max(P) * D) |
O(1) |
Easy |
|
|
C |
Dijkstra |
[Python](./Qualification Round/dijkstra.py) |
O(L) |
O(L) |
Medium |
|
|
D |
Ominous Omino |
[Python](./Qualification Round/ominous-omino.py) |
O(1) |
O(1) |
Hard |
|
|
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Mushroom Monster |
[Python](./Round 1A/mushroom-monster.py) |
O(S) |
O(1) |
Easy |
|
|
B |
Haircut |
[Python](./Round 1A/haircut.py) |
O(log(N * max(M)) + BlogB) |
O(B) |
Medium |
|
Binary Search |
C |
Logging |
[C++](./Round 1A/logging.cpp) [Python](./Round 1A/logging.py) |
O(N^2) |
O(N) |
Hard |
|
|
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Counter Culture |
[Python](./Round 1B/counter-culture.py) |
O(logN) |
O(logN) |
Easy |
|
|
B |
Noisy Neighbors |
[C++](./Round 1B/noisy-neighbors.cpp) [Python](././Round 1B/noisy-neighbors.py) |
O(R * C) |
O(1) |
Medium |
|
|
C |
Hiking Deer |
[C++](./Round 1B/hiking-deer.cpp) [Python](./Round 1B/hiking-deer.py) |
O(HlogH) |
O(H) |
Hard |
|
Heap |
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Brattleship |
[Python](./Round 1C/brattleship.py) |
O(1) |
O(1) |
Easy |
|
|
B |
Typewriter Monkey |
[Python](./Round 1C/typewriter-monkey.py) |
O(K + L * S) |
O(K + L) |
Medium |
|
DP |
C |
Less Money, More Problems |
[Python](./Round 1C/less-money-more-problems.py) |
O(V / ((C + D) * D)) |
O(1) |
Easy |
|
|
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Pegman |
[Python](./Round 2/pegman.py) |
O(R * C) |
O(R + C) |
Easy |
|
|
B |
Kiddie Pool |
[Python](./Round 2/kiddie-pool.py) |
O(NlogN) |
O(1) |
Medium |
|
Optimization |
C |
Bilingual |
[C++](./Round 2/bilingual.cpp) [Python](./Round 2/bilingual.py) |
O((N * L)^2) |
O(N * L) |
Hard |
|
Max Flow |
D |
Drum Decorator |
[Python](./Round 2/drum-decorator.py) |
O(R^2) |
O(1) |
Hard |
|
DP |
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Fairland |
[Python](./Round 3/fairland.py) |
O(NlogN) |
O(N) |
Easy |
|
|
B |
Smoothing Window |
[Python](./Round 3/smoothing-window.py) |
O(N) |
O(N) |
Medium |
|
|
C |
Runaway Quail |
[C++](./Round 3/runaway-quail.cpp) [Python](./Round 3/runaway-quail.py) |
O(N^3) |
O(N^2) |
Medium |
|
DP |
D |
Log Set |
[Python](./Round 3/log-set.py) |
O(N * (logN)^2) |
O(logN) |
Hard |
|
Hash |
E |
River Flow |
[Python](./Round 3/river-flow.py) |
O(DlogD) |
O(D) |
Medium |
|
|
You can relive the magic of the 2015 Code Jam World Finals by watching the Live Stream Recording of the competition, problem explanations, interviews with Google and Code Jam engineers, and announcement of winners.
# |
Title |
Solution |
Time |
Space |
Difficulty |
Tag |
Note |
A |
Costly Binary Search |
[C++](./World Finals/costly-binary-search.cpp) [*Python](./World Finals/costly-binary-search.py) |
O(NlogN) |
O(N) |
Medium |
|
DP (Python would TLE in large input) |
B |
Campinatorics |
[Python](./World Finals/campinatorics.py) |
O(N) |
O(N) |
Medium |
|
DP, Euler's Theorem |
C |
Pretty Good Proportion |
[C++](./World Finals/pretty-good-proportion.cpp) [Python](./World Finals/pretty-good-proportion.py) |
O(NlogN) |
O(N) |
Easy |
|
Sort |
D |
Taking Over The World |
[C++](./World Finals/taking-over-the-world.cpp) [Python](./World Finals/taking-over-the-world.py) |
O(K * N * M^2) |
O(N^2) |
Hard |
|
Max Flow |
E |
Merlin QA |
[Python](./World Finals/merlin-qa.py) |
O(M! * (N * M)) |
O(N * M) |
Medium |
|
|
F |
Crane Truck |
|
|
|
Hard |
|
|