{"id":29164060,"url":"https://github.com/kamyu104/googlecodejam-farewell-rounds","last_synced_at":"2025-07-23T06:33:18.436Z","repository":{"id":159079125,"uuid":"628515124","full_name":"kamyu104/GoogleCodeJam-Farewell-Rounds","owner":"kamyu104","description":"🏁 🏃 Python3 Solutions of All 20 Problems in GCJ 2023 Farewell Rounds","archived":false,"fork":false,"pushed_at":"2023-04-30T03:46:38.000Z","size":100,"stargazers_count":9,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-01T06:53:02.364Z","etag":null,"topics":["algorithm","code-jam","codejam","codejam-problems","codejam2023","competitive-programming","contest-programming","farewell-round","farewell-rounds","gcj","google-code-jam","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kamyu104.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-04-16T07:22:27.000Z","updated_at":"2025-06-26T13:33:40.000Z","dependencies_parsed_at":"2023-07-21T22:18:41.237Z","dependency_job_id":null,"html_url":"https://github.com/kamyu104/GoogleCodeJam-Farewell-Rounds","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kamyu104/GoogleCodeJam-Farewell-Rounds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamyu104%2FGoogleCodeJam-Farewell-Rounds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamyu104%2FGoogleCodeJam-Farewell-Rounds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamyu104%2FGoogleCodeJam-Farewell-Rounds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamyu104%2FGoogleCodeJam-Farewell-Rounds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kamyu104","download_url":"https://codeload.github.com/kamyu104/GoogleCodeJam-Farewell-Rounds/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kamyu104%2FGoogleCodeJam-Farewell-Rounds/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266631358,"owners_count":23959419,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","code-jam","codejam","codejam-problems","codejam2023","competitive-programming","contest-programming","farewell-round","farewell-rounds","gcj","google-code-jam","python3"],"created_at":"2025-07-01T06:39:42.914Z","updated_at":"2025-07-23T06:33:18.427Z","avatar_url":"https://github.com/kamyu104.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [GoogleCodeJam Farewell Rounds](https://codingcompetitions.withgoogle.com/codejam/archive/2023)\n\n![Language](https://img.shields.io/badge/language-Python3-orange.svg)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n![Progress](https://img.shields.io/badge/progress-20%20%2F%2020-ff69b4.svg)\n![Visitors](https://visitor-badge.laobi.icu/badge?page_id=kamyu104.googlecodejam.farewell.rounds)\n\n* Python solutions of Google Code Jam Farewell Rounds. Solution begins with `*` means it will get TLE in the largest data set.\n* Total computation amount \u003e `10^8` is not friendly for Python to solve in 5 ~ 15 seconds.\n* A problem was marked as `Very Hard` means that it was an unsolved one during the contest and may not be that difficult.\n\n## Rounds\n\n* [Kick Start 2022](https://github.com/kamyu104/GoogleKickStart-2022)\n* [Code Jam to I/O for Women 2022](https://github.com/kamyu104/GoogleCodeJamIO-2022)\n* [Code Jam 2022](https://github.com/kamyu104/GoogleCodeJam-2022)\n* [Round A](https://github.com/kamyu104/GoogleCodeJam-Farewell-Rounds#round-a)\n* [Round B](https://github.com/kamyu104/GoogleCodeJam-Farewell-Rounds#round-b)\n* [Round C](https://github.com/kamyu104/GoogleCodeJam-Farewell-Rounds#round-c)\n* [Round D](https://github.com/kamyu104/GoogleCodeJam-Farewell-Rounds#round-d)\n\n## Round A\n\n- Round A is appropriate for beginners.\n\n| # | Title | Solution | Time | Space | Difficulty | Tag | Note |\n|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |\n|A| [Colliding Encoding](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b94/0000000000cad7cf)| [Python3](./Round%20A/colliding_encoding.py3)| _O(N)_ | _O(N)_ | Easy | | Hash Table |\n|B| [Illumination Optimization](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b94/0000000000cad086)| [Python3](./Round%20A/illumination_optimization.py3) | _O(N)_ | _O(1)_ | Medium | | Greedy |\n|C| [Rainbow Sort](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b94/0000000000cada38)| [Python3](./Round%20A/rainbow_sort.py3)| _O(N)_ | _O(N)_ | Easy | | Hash Table |\n|D| [ASCII Art](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b94/0000000000cad9c2)| [Python3](./Round%20A/ascii_art.py3) | _O(1)_ | _O(1)_ | Easy | | Math |\n|E| [Untie](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b94/0000000000cad9c1)| [Python3](./Round%20A/untie.py3) | _O(N)_ | _O(1)_ | Medium | | Greedy |\n\n## Round B\n\n- Round B is about the level of a Kick Start round or a Code Jam Round 1.\n\n| # | Title | Solution | Time | Space | Difficulty | Tag | Note |\n|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |\n|A| [Collecting Pancakes](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c9607c/0000000000cad7d1)| [Python3](./Round%20B/collecting_pancakes.py3)| _O(N)_ | _O(1)_ | Medium | | Greedy, Prefix Sum |\n|B| [Intruder Outsmarting](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c9607c/0000000000cad13d)| [Python3](./Round%20B/intruder_outsmarting.py3) | _O(W * log(min(D, N)))_ | _O(1)_ | Medium | | Extended Euclidean Algorithm  |\n|C| [Spacious Sets](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c9607c/0000000000cad2ce)| [Python3](./Round%20B/spacious_sets.py3) | _O(NlogN)_ | _O(N)_ | Easy | | Binary Search, DP|\n|D| [Railroad Maintenance](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c9607c/0000000000cad77d)| [PyPy3](./Round%20B/railroad_maintenance.py3) | _O(N + L)_ | _O(N + L)_ | Hard | | DFS, Biconnected Components, Articulation Points |\n|E| [Railroad Management](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c9607c/0000000000caccfb)| [Python3](./Round%20B/railroad_management.py3) | _O(N)_ | _O(N)_ | Hard | | Graph, Cycle |\n\n## Round C\n\n- Round C is harder than a Code Jam Round 2 but easier than a Code Jam Round 3.\n\n| # | Title | Solution | Time | Space | Difficulty | Tag | Note |\n|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |\n|A| [Game Sort: Part 1](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95433/0000000000cacb87)| [Python3](./Round%20C/game_sort_part_1.py3)  | _O(P * L)_ | _O(1)_ | Easy | | Greedy, Counting Sort, Freq Table |\n|B| [Immunization Operation](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95433/0000000000cacb88)| [Python3](./Round%20C/immunization_operation.py3)  |  _O(M + VlogV)_ | _O(V)_  | Easy | | Simulation, Heap |\n|C| [Evolutionary Algorithms](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95433/0000000000cad08b)| [PyPy3](./Round%20C/evolutionary_algorithms.py3) | _O(NlogN)_  |  _O(N)_ | Medium | | DFS, BIT, Fenwick Tree, Coordinate Compression, Combinatorics |\n|D| [The Decades of Coding Competitions](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95433/0000000000cad9c6)| [PyPy3](./Round%20C/the_decades_of_coding_competitions.py3) | _O(K * (N + M + Q))_  |  _O(K * N)_ |  Medium | | Graph, Union Find, DSU |\n|E| [Game Sort: Part 2](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95433/0000000000cad339)| [Python3](./Round%20C/game_sort_part_2.py3) | _O(N)_ | _O(1)_ | Hard | ❤️ | Constructive Algorithms, Prefix Sum, Freq Table, Greedy |\n\n## Round D\n\n- Round D is meant for experienced competitors. It is between a Code Jam Round 3 and Finals difficulty.\n\n| # | Title | Solution | Time | Space | Difficulty | Tag | Note |\n|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |\n|A| [Indispensable Overpass](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b95/0000000000cadc76)| [Python3](./Round%20D/indispensable_overpass.py3) | _O(W + E + C)_ | _O(W + E)_  | Easy | | Tree DP, Combinatorics |\n|B| [Genetic Sequences](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b95/0000000000cadc77)| [PyPy3](./Round%20D/genetic_sequences.py3) [PyPy3](./Round%20D/genetic_sequences2.py3) | _O((N + M) * log(N + M) + Q * log(min(N, M)) * logN)_ | _O((N + M) * log(N + M))_ | Medium | | Suffix Array, LCP Array, Binary Search, RMQ, Sparse Table, Persistent BST, Persistent Treap |\n|C| [Hey Google, Drive!](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b95/0000000000caccfa)| [PyPy3](./Round%20D/hey_google_drive.py3) | _O((R * C)^2 * F)_ | _O(R * C)_  | Hard | ❤️ | Graph, BFS |\n|D| [Old Gold](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b95/0000000000cada3b)| [PyPy3](./Round%20D/old_gold.py3) | _O(NlogN)_ | _O(N)_ | Hard | ❤️ | Combinatorics, DP, Prefix Sum |\n|E| [Ring-Preserving Networks](https://codingcompetitions.withgoogle.com/codejam/round/0000000000c95b95/0000000000cad08a)| [Python3](./Round%20D/ring_preserving_networks.py3) | _O(L)_ | _O(L)_ | Medium | | Graph, Constructive Algorithms, Clique, Greedy |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamyu104%2Fgooglecodejam-farewell-rounds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkamyu104%2Fgooglecodejam-farewell-rounds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkamyu104%2Fgooglecodejam-farewell-rounds/lists"}