Python3 solutions of Meta Hacker Cup 2022. Solution begins with *
means it will get TLE in the largest data set (total computation amount > 10^8
, which is not friendly for Python3 to solve in 5 ~ 15 seconds). A 6-minute
timer is set for uploading the result this year.
# | Title | Solution | Time | Space | Difficulty | Tag | Note |
---|---|---|---|---|---|---|---|
A | Second Hands | Python3 | O(N) | O(N) | Easy | Greedy | |
B1 | Second Friend | Python3 | O(R * C) | O(1) | Easy | Constructive Algorithms | |
B2 | Second Second Friend | Python3 | O(R * C) | O(R * C) | Medium | Constructive Algorithms, BFS | |
C1 | Second Meaning | Python3 | O(N^2) | O(N) | Easy | Constructive Algorithms | |
C2 | Second Second Meaning | Python3 | O(NlogN) | O(logN) | Medium | Constructive Algorithms | |
D | Second Flight | Python3 Python3 | O(N + Q + M * min(sqrt(Q), N)) | O(N + M + Q) | Hard | Graph, Memoization |