Python solutions of Google Code Jam 2015. Solution begins with *
means it will get TLE in the largest data set (total computation amount > 10^8
, which is not friendly for Python to solve in 5 ~ 15 seconds). A 4-minute
timer is set for the small dataset and a 8-minute
timer is set for the large dataset this year.
- Code Jam 2014
- Qualification Round
- Round 1A
- Round 1B
- Round 1C
- Round 2
- Round 3
- World Finals
- Code Jam 2016
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Standing Ovation | Python | O(S) | O(1) | Easy | ||
B | Infinite House of Pancakes | Python | O(max(P) * D) | O(1) | Easy | ||
C | Dijkstra | Python | O(L) | O(L) | Medium | ||
D | Ominous Omino | Python | O(1) | O(1) | Hard |
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Mushroom Monster | Python | O(S) | O(1) | Easy | ||
B | Haircut | Python | O(log(N * max(M)) + BlogB) | O(B) | Medium | Binary Search | |
C | Logging | C++ Python | O(N^2) | O(N) | Hard |
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Counter Culture | Python | O(logN) | O(logN) | Easy | ||
B | Noisy Neighbors | C++ Python | O(R * C) | O(1) | Medium | ||
C | Hiking Deer | C++ Python | O(HlogH) | O(H) | Hard | Heap |
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Brattleship | Python | O(1) | O(1) | Easy | ||
B | Typewriter Monkey | Python | O(K + L * S) | O(K + L) | Medium | DP | |
C | Less Money, More Problems | Python | O(V / ((C + D) * D)) | O(1) | Easy |
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Pegman | Python | O(R * C) | O(R + C) | Easy | ||
B | Kiddie Pool | Python | O(NlogN) | O(1) | Medium | Optimization | |
C | Bilingual | C++ Python | O((N * L)^2) | O(N * L) | Hard | Max Flow | |
D | Drum Decorator | Python | O(R^2) | O(1) | Hard | DP |
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Fairland | Python | O(NlogN) | O(N) | Easy | ||
B | Smoothing Window | Python | O(N) | O(N) | Medium | ||
C | Runaway Quail | C++ Python | O(N^3) | O(N^2) | Medium | DP | |
D | Log Set | Python | O(N * (logN)^2) | O(logN) | Hard | Hash | |
E | River Flow | Python | 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++ PyPy | O(NlogN) | O(N) | Medium | DP | |
B | Campinatorics | Python | O(N) | O(N) | Medium | DP, Euler's Theorem | |
C | Pretty Good Proportion | C++ Python | O(NlogN) | O(N) | Easy | Sort | |
D | Taking Over The World | C++ Python | O(K * N * M^2) | O(N^2) | Hard | Max Flow | |
E | Merlin QA | Python | O(M! * (N * M)) | O(N * M) | Medium | ||
F | Crane Truck | C++ PyPy | O(N^2) | O(N^2) | Very Hard | โค๏ธ | Simulation |