Giter Club home page Giter Club logo

googlecodejam-2017's Introduction

Python solutions of Google Code Jam 2017. 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

# Title Solution Time Space Difficulty Tag Note
A Oversized Pancake Flipper Python O(K * S) O(S) Easy Greedy
B Tidy Numbers Python O((logN)^2) O(logN) Easy Math Analysis
C Bathroom Stalls Python O(logK) O(1) Easy BST
D Fashion Show Python O(N^2) O(N) Hard Greedy

Round 1A

# Title Solution Time Space Difficulty Tag Note
A Alphabet Cake Python O(R * C) O(1) Easy Greedy
B Ratatouille Python O(N^2 * P^2) O(N * P) Medium Greedy
C Play The Dragon Python O(sqrt(N)) O(1) Hard โค๏ธ Math Analysis

Round 1B

# Title Solution Time Space Difficulty Tag Note
A Steed 2: Cruise Control Python O(N) O(1) Easy Math Analysis
B Stable Neigh-bors Python O(N) O(1) Hard Math Analysis
C Pony Express Python O(N^3) O(1) Medium Floyd-Warshall

Round 1C

# Title Solution Time Space Difficulty Tag Note
A Ample Syrup Python O(NlogK) O(K) Easy Sort, Heap
B Parenting Partnering Python O(NlogN) O(N) Medium Sort, Greedy
C Core Training Python O(N^2 * K) O(N) Hard DP, Probability

Round 2

# Title Solution Time Space Difficulty Tag Note
A Fresh Chocolate Python O(1) O(1) Easy Math, Greedy
B Roller Coaster Scheduling Python O(M + N) O(M) Easy Math, Greedy
C Beaming With Joy Python O(R * C) O(R * C) Medium CNF, 2-SAT, SCC, Tarjan's Algorithm
D Shoot the Turrets Python O(S * R * C + S * T^2 + T * S * (R + C)) O(S * R * C) Hard BFS, Bipartite Matching

Round 3

# Title Solution Time Space Difficulty Tag Note
A Googlements Python O(L * (H(L + 1, L) - 1)) O(L) Easy Math, Backtracking, Pruning
B Good News and Bad News Python O(P^2) O(P) Medium Graph, DFS, Spanning Tree
C Mountain Tour Python O(C * log*(C)) O(C) Medium Union Find, Greedy
D Slate Modern Python O(N^2) O(N^2) Hard โค๏ธ Manhattan Distance, Coordinate Compression, DP, Arithmetic Progression

World Finals

You can relive the magic of the 2017 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 Dice Straight PyPy PyPy O(N^2) O(N) Medium Sliding Window, Bipartite Matching, Ford-Fulkerson Algorithm
B Operation Python O(11*2^11 * (N * D^2)) O(2^11 * (N * D)) Medium Grouping, Greedy, DP
C Spanning Planning PyPy O(R * N^3) O(N^2) Hard Cycle, Spanning Tree, Kirchhoff Matrix Tree Theorem, Determinant, Gaussian Elimination
D Omnicircumnavigation PyPy O(N^2) O(N) Easy โค๏ธ Geometry, Plane, Vector, Inner Product, Outer Product
E Stack Management Python O((N * C) * logN) O(N * C) Very Hard โค๏ธ Preprocess, Stack, DFS
F Teleporters PyPy O(N^3 * logM) O(N^2 * logM) Very Hard โค๏ธ Geometry, Binary Search, Distance Matrix, Power of 2, Precompute, Iterated Squaring

googlecodejam-2017's People

Contributors

kamyu104 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.