GoogleCodeJam 2022

- Python3 solutions of Google Code Jam 2022. Solution begins with
*means it will get TLE in the largest data set. - Total computation amount >
10^8is not friendly for Python3 to solve in 5 ~ 15 seconds. - A problem was marked as
Very Hardmeans that it was an unsolved one during the contest and may not be that difficult.
Rounds
Qualification Round
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Punched Cards | Python3 | O(R * C) | O(1) | Easy | Array | |
| B | 3D Printing | Python3 | O(1) | O(1) | Easy | Math | |
| C | d1000000 | PyPy3 Python3 | O(NlogN) | O(1) | Easy | Sort | |
| D | Chain Reactions | Python3 Python3 | O(N) | O(N) | Medium | Topological Sort, Greedy | |
| E | Twisty Little Passages | Python3 Python3 | O(min(K, N)) | O(min(K, N)) | Hard | Probability, Importance Sampling |
Round 1A
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Double or One Thing | Python3 | O(|S|) | O(1) | Easy | String | |
| B | Equal Sum | Python3 Python3 | O(N) | O(1) | Medium | Math, Constructive Algorithms | |
| C | Weightlifting | Python3 | O(E^2 * W + E^3) | O(E^2 + W) | Hard | DP |
Round 1B
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Pancake Deque | Python3 | O(N) | O(1) | Easy | Greedy | |
| B | Controlled Inflation | Python3 | O(N * P) | O(1) | Medium | DP | |
| C | ASeDatAb | Python3 Python3 Python3 | O(L * 2^L) | O(L) | Hard | Precompute, BFS, Topological Sort, Constructive Algorithms |