Рет қаралды 1,484
I started 3 minutes late but still got 2nd! Anyways, explanations start at 10:11. If they are a bit unclear, feel free to ask questions in the comments below so that I can improve!
Bonus: Solve the 2nd problem in O(nlogn), with the modification that you need to count the number of subarrays of any length! (atcoder.jp/con...)
If this video was helpful, be sure to like & subscribe!