What do I do when I am spending hours to understand a solution

Some bonus for you :slightly_smiling_face:
Here is a significant portion of blogs/problem lists I read/solved some problems from last summer

DP on trees
Sqrt Decomposition
Convex Hull Trick [This isn’t convex hull, its a DP optimization]
Graphs Problems [Morass’s comment here is GOLD]
All problems topic wise [Morass]
Bitmask-DP ham-path
Sum over Subsets DP
FFT
Randomly came across this
Using FFT for some recent(back then) long challenge problem

In general Codeforces comments section is a gold mine of nice problem suggestions, alternate solutions and some nice humor.

9 Likes