Python solutions of Google Code Jam 2008. 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.
- Qualification Round
- Round 1A
- Round 1B
- Round 1C
- Round 2
- Round 3
- APAC Semifinal
- AMER Semifinal
- EMEA Semifinal
- World Finals
- Code Jam 2009
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Saving the Universe | ||||||
| B | Train Timetable | ||||||
| C | Fly Swatter |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Minimum Scalar Product | Python | O(NlogN) | O(1) | Easy | Sort | |
| B | Milkshakes | ||||||
| C | Numbers | Python | O(logN) | O(1) | Easy | Matrix Exponentiation |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Crop Triangles | ||||||
| B | Number Sets | Python | O(F * (B - A)) | O(B - A) | Easy | Prime Sieving, Binary Search, Union Find | |
| C | Mousetrap |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Text Messaging Outrage | ||||||
| B | Ugly Numbers | ||||||
| C | Increasing Speed Limits |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Cheating a Boolean Tree | ||||||
| B | Triangle Areas | ||||||
| C | Star Wars | ||||||
| D | PermRLE |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | How Big Are the Pockets? | ||||||
| B | Portal | ||||||
| C | No Cheating | Python | O(M * N * sqrt(M * N) | O(M * N) | Easy | Bipartite Matching | |
| D | Endless Knight |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | What are Birds? | ||||||
| B | Apocalypse Soon | ||||||
| C | Millionaire | C++ PyPy | O(4^M) | O(2^M) | Medium | DP | |
| D | Modern Art Plagiarism |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Mixing Bowls | ||||||
| B | Code Sequence | ||||||
| C | Test Passing Probability | ||||||
| D | King | O(R * C * 2^C) | O(R * C * 2^C) | Very Hard | DP, Brute Force |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Scaled Triangle | ||||||
| B | Painting a Fence | ||||||
| C | Rainbow Trees | ||||||
| D | Bus Stops |
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---|---|---|---|---|---|---|---|
| A | Juice | ||||||
| B | Ping Pong Balls | ||||||
| C | Mine Layer | ||||||
| D | Bridge Builders | ||||||
| E | The Year of Code Jam |