GoogleCodeJam Farewell Rounds

April 30, 2023 · View on GitHub

Language License Progress Visitors

  • Python solutions of Google Code Jam Farewell Rounds. Solution begins with * means it will get TLE in the largest data set.
  • Total computation amount > 10^8 is not friendly for Python to solve in 5 ~ 15 seconds.
  • A problem was marked as Very Hard means that it was an unsolved one during the contest and may not be that difficult.

Rounds

Round A

  • Round A is appropriate for beginners.
#TitleSolutionTimeSpaceDifficultyTagNote
AColliding EncodingPython3O(N)O(N)EasyHash Table
BIllumination OptimizationPython3O(N)O(1)MediumGreedy
CRainbow SortPython3O(N)O(N)EasyHash Table
DASCII ArtPython3O(1)O(1)EasyMath
EUntiePython3O(N)O(1)MediumGreedy

Round B

  • Round B is about the level of a Kick Start round or a Code Jam Round 1.
#TitleSolutionTimeSpaceDifficultyTagNote
ACollecting PancakesPython3O(N)O(1)MediumGreedy, Prefix Sum
BIntruder OutsmartingPython3O(W * log(min(D, N)))O(1)MediumExtended Euclidean Algorithm
CSpacious SetsPython3O(NlogN)O(N)EasyBinary Search, DP
DRailroad MaintenancePyPy3O(N + L)O(N + L)HardDFS, Biconnected Components, Articulation Points
ERailroad ManagementPython3O(N)O(N)HardGraph, Cycle

Round C

  • Round C is harder than a Code Jam Round 2 but easier than a Code Jam Round 3.
#TitleSolutionTimeSpaceDifficultyTagNote
AGame Sort: Part 1Python3O(P * L)O(1)EasyGreedy, Counting Sort, Freq Table
BImmunization OperationPython3O(M + VlogV)O(V)EasySimulation, Heap
CEvolutionary AlgorithmsPyPy3O(NlogN)O(N)MediumDFS, BIT, Fenwick Tree, Coordinate Compression, Combinatorics
DThe Decades of Coding CompetitionsPyPy3O(K * (N + M + Q))O(K * N)MediumGraph, Union Find, DSU
EGame Sort: Part 2Python3O(N)O(1)Hard❤️Constructive Algorithms, Prefix Sum, Freq Table, Greedy

Round D

  • Round D is meant for experienced competitors. It is between a Code Jam Round 3 and Finals difficulty.
#TitleSolutionTimeSpaceDifficultyTagNote
AIndispensable OverpassPython3O(W + E + C)O(W + E)EasyTree DP, Combinatorics
BGenetic SequencesPyPy3 PyPy3O((N + M) * log(N + M) + Q * log(min(N, M)) * logN)O((N + M) * log(N + M))MediumSuffix Array, LCP Array, Binary Search, RMQ, Sparse Table, Persistent BST, Persistent Treap
CHey Google, Drive!PyPy3O((R * C)^2 * F)O(R * C)Hard❤️Graph, BFS
DOld GoldPyPy3O(NlogN)O(N)Hard❤️Combinatorics, DP, Prefix Sum
ERing-Preserving NetworksPython3O(L)O(L)MediumGraph, Constructive Algorithms, Clique, Greedy