Kickstart A Round 2020
This year’s round of Kick Start was much easier than in previous years—easy enough that I solved every problem, even though I could not solve yesterday’s LeetCode Problem D.
The strongest people on the leaderboard finished all of them in as little as 16 minutes. After writing these notes, I realised I have been getting worse this year. ^ - ^
A. Allocation
Greedy.
1 | std::vector<int> v; |
B. Plates
The problem ultimately becomes a 0/1 knapsack problem; a greedy approach clearly does not work.
1 |
|
C. Workout
Binary search.
1 | ll n,k; |
D. Bundling
Use a trie, then apply a greedy strategy.
1 |
|