I have a question about upsolving.
Suppose I participate in a contest and get stuck on a problem. I spend around 30–40 minutes (or even longer) trying to solve it, but I can't find the solution.
Normally, I would then read the editorial and try to understand the intended approach.
But what should I do when I don't understand the editorial either?
For example, sometimes I read the editorial multiple times and still don't understand:
where the key observation came from, why a particular approach works, why a certain greedy choice is valid, how the DP state was discovered, or how the solution goes from the observation to the final algorithm.
Then I look at the accepted solutions, but the code also doesn't help much because I don't understand the underlying idea.
I've also tried asking AI to explain the solution, but sometimes even after several explanations I still can't genuinely understand the reasoning well enough to reproduce the solution myself.
So my question is:
What is the best way to upsolve in this situation?
Should I:
Keep trying the problem for several more hours? Read multiple editorials/tutorials until something clicks? First learn the underlying technique separately and then return to the problem? Solve easier problems using the same concept? Try to derive the solution from brute force/small test cases? Move on and come back to the problem after some time? Use some specific websites/resources that explain Codeforces problems in a more beginner-friendly way?
I'm especially interested in advice from people who have gone through this themselves and improved their problem-solving ability.
What do you personally do when you are completely stuck on a problem and even the editorial doesn't make sense?
Also, if there are any good resources specifically for learning the reasoning behind Codeforces solutions rather than just reading the final algorithm/code, I would really appreciate recommendations.
Thanks!







