PersistentLife's blog

By PersistentLife, history, 13 days ago, In English

This post is about:

  1. The Main Two Abilities You Need in Competitive Programming
  2. How to Choose Problems of an Appropriate Difficulty
  3. How Should You Work on a Problem
  4. When You Should Learn New Knowledge (Like New Algorithms)
  5. How to Train Before an Important Contest
  6. Free Content, Personalized Subscription Services, and Potential Opportunity for One-to-One Coaching
  7. Survey About the Services

I won a gold medal at NOI 2024 in my second year of high school and was admitted to the Turing Class at Peking University. After securing my admission, I continued pursuing competitive programming: I began studying new material at university in advance while also challenging myself in higher-level competitions. During the winter of my final year of high school, I competed in the Universal Cup 2025 Finals and placed fifth among many strong contestants from around the world.

At the same time, I became a competitive programming coach because I wanted to give back to the community. At both NOI 2025 and NOI 2026, students whom I had coached one-to-one won gold medals. At NOI 2026, my student W won a gold medal and was selected for the national training team. He and his mother first contacted me in December 2024, when I was still a new coach, and asked me to become his one-to-one coach.

In this post, I will draw on my own experience as both a contestant and a coach to discuss what I consider scientific training methods, appropriate problem selection, and several common mistakes in competitive programming.

Many questions do not have completely black-and-white answers. If you disagree with any of my views, friendly discussion in the comments is welcome.

1. The Main Two Abilities You Need in Competitive Programming

A programming contest contains several problems, and you need to write a program for each of them. After reading a problem, you generally need to do two things:

  1. Analyze the characteristics of the objects in the problem, build a model, and design an algorithm.
  2. Implement your idea in code.

I call the ability required for the first part thinking ability, and the ability required for the second part coding ability. The abilities required in competitive programming can be roughly divided into these two categories.

Coding ability is relatively mechanical and comparatively easy to train. You need to write more code, debug more code, and challenge some implementation-heavy problems. You should know how to implement different algorithms and structures quickly and accurately. If you frequently know how to solve a problem in a contest but fail to finish the implementation, you should recognize that your coding ability may be insufficient.

Thinking ability is the problem that troubles many high-level contestants. Strong contestants generally already possess adequate coding ability and can probably finish the problems they know how to solve. To improve their contest results further, they need stronger thinking ability so that they can discover solutions to more problems.

I prefer to view competitive programming as a competitive activity rather than as the study of an ordinary school subject. It is more like playing games like Chess: if you mechanically memorize games produced by AI without considering the reasoning behind each move, then some small changes may leave you unable to respond.

Problem structures in competitive programming can be combined in countless different ways. Purely solving a large number of problems or memorizing problems you have already seen cannot replace an understanding of the underlying ideas. OI is a competitive activity, and depth of training is far more important than breadth.

2. Choose Problems of an Appropriate Difficulty

Many students have a strong desire to challenge themselves, and many parents also want their children to keep attempting harder problems. As a result, they may blindly pursue problem difficulty.

However, if a problem is far beyond your current level, it will usually lead to one of the following outcomes:

  1. You read a large amount of editorial material but still fail to understand anything fundamental. Eventually, you give up, waste your time, and become frustrated.
  2. To get accepted, you quickly copy someone else’s code or implement the editorial line by line. This creates a false sense of achievement, while your time is still wasted.
  3. You memorize the editorial and code word for word and tell yourself that you have mastered the problem. The next day, when you are given a very similar problem, you still cannot solve it.

During my coaching experience, I have often seen parents search for “problem sets used by top contestants.” They want to know what famous contestants normally solve and assume that completing the same problems will also turn their child into a top contestant. In most cases, this becomes ineffective problem grinding that wastes time and damages the student’s confidence.

In my opinion, an appropriately difficult problem usually produces one of the following two training experiences:

  1. I cannot solve the problem immediately, but after patient attempts, exploration, and analysis, I can eventually work it out.
  2. I spend a long time thinking but still cannot solve the problem. However, when I read the editorial, I suddenly understand it; after seeing only a few important sentences, I gain a clear understanding of the entire problem.

Finding problems of the right difficulty is not easy. Problems in the same position across two contests from the same series can vary significantly in difficulty. Also, the difficulty rating on some platforms are not clear. Codeforces and AtCoder ratings are relatively objective, but you should still account for the premium created by the contest format: The later a problem appears, the less time contestants can devote to it; compounded by the fact that some problems may be complex to implement, this often means that even contestants capable of solving them independently run out of time during the competition.

When practicing on Codeforces, you can roughly limit your problem range to your current rating plus 200 to 400. If you are training thinking ability through topics such as dynamic programming or greedy algorithms, use the lower end of this range. If you are training coding ability, you can use the higher end.

3. How Should You Work on a Problem?

When I assign a problem to a student, I set a specific thinking time for it. This means that the student may read the editorial only after spending that amount of time without making any progress.

This thinking time is not exactly the same as the difficulty of the problem. Some relatively easy problems contain many details, so I may allow more time. Some very difficult problems are unlikely to be solved independently unless the contestant quickly matches the intended line of thought, so I may allow less time.

Regardless of whether the student has read the editorial, I require the student to implement the solution independently. Independently writing and debugging code is the only way to improve coding ability. If the student asks a teacher or an AI for help during implementation, the training effect is greatly reduced.

After getting accepted, I require the student to write a problem-solving note. The student should not merely copy the statement or editorial. Instead, the note should tell a “story” explaining how the solution could be discovered: why this starting point was chosen, what structure was observed, and which property of that structure was used.

Such a note is fundamentally different from an editorial. The main task of an editorial is to present a correct solution and prove that it works, so it may not record a thought process that a contestant could realistically discover and follow during a contest.

I have never imposed a fixed number of problems that a student must complete each day. As long as you are continuously thinking, doing a meaningful amount of analysis, and repeatedly writing and debugging code, your ability is improving. What matters more than simply increasing the number of solved problems is how much real thinking occurs in each problem.

4. When You Should Learn New Knowledge (Like New Algorithms)

No matter what type of problem appears in a contest, both thinking ability and coding ability are involved. Therefore, you should first raise these two abilities to the level required by your goal.

Relatively uncommon topics such as computational geometry and number theory may be included in a syllabus but may not have appeared frequently in recent years. More importantly, when your thinking ability and coding ability are insufficient, simply knowing the topic involved in a problem will still not allow you to solve many problems.

My personal method is to study a topic when I encounter a problem that I cannot solve because I do not know the required material.

This has two advantages:

  1. Frequently used topics will gradually be covered through normal problem solving.
  2. When learning a topic, you already have a natural problem in front of you, which helps you understand and apply the topic.

After your thinking ability and coding ability have reached an adequate level, you can identify and fill the remaining gaps in less common topics. In essence, this protects you from being defeated by a low-probability event.

If your fundamental abilities have not yet reached your target level, there is no need to prioritize spending large amounts of time protecting yourself against these low-probability events. You should also avoid gambling on the possibility that a rare topic will appear and that you will know it while everyone else does not.

5. How to Train Before an Important Contest

Contestants can be roughly divided into two categories.

The first category treats the current year's contest as a “final exam” and mainly wants to obtain a result. For these contestants, making a major improvement in their underlying ability within a month is almost impossible. Therefore, the most cost-effective approach is to train the ability to convert existing strength into points.

The second category treats the current year's contest as a “midterm exam” and considers the following year’s contest to be the final goal. These contestants can still focus mainly on improving their underlying ability, while adding an appropriate number of practice contests and strategy according to how much they value their result in the current contest.

The more you care about the result of the current contest, the greater the pressure and risk of failure you face. Your ability to convert strength into points will therefore be challenged more severely, and you should use more practice contests to address this issue.

A practice contest should be treated as an official contest. You should try to maximize your score, implement every partial solution that is worth writing, and use stress testing when stress testing is necessary.

If you are too lazy to do these things in practice contests, the apparent duration of your practice contests is being extended. During the official contest, these tasks you skipped in practice contests will still consume time. The contest will suddenly feel shorter, and your rhythm may collapse.

After every practice contest, you must review both your contest strategy and your mental state. When possible, you can attend an offline training camp and place yourself in a higher-pressure environment.

6. Free Content, Personalized Subscription Services, and Potential Opportunity for One-to-One Coaching

I plan to provide several services to the competitive programming community.

The free content will include:

  • Regular recommendations of problems suitable for training;
  • Solutions and explanations for those problems.

I am also considering several optional subscription-based services:

  • Additional recommended problems and solutions;
  • Personalized problem recommendations and solutions based on an individual contestant’s level and goals.

Also I will provide one-to-one coaching. To ensure the quality of each student's service, I will only provide a few seats. In one-to-one coaching, you could ask individual questions about the subscribed problems and learning materials, such as requesting a small hint, explaining a solution. Coaching would also include diagnosis of weaknesses, training-plan design, problem selection, learning methods, problem-solving methods, contest strategy, post-contest review.

UPD: For the free problem recommendation and additional problems for subscribing, I plan to release once per week in September.

I will continue if many people follow it and subscribe.

7. Survey About the Services

To understand the current training situations, plans, and actual needs of contestants at different levels, I have prepared a survey. It asks for your Codeforces handle, current rating, target rating, target competitions and awards, weekly training time, and your interest in and budget for the services described above.

Survey link

Even if you are not considering any subscription service, you are still welcome to complete the survey or share your training situation and opinions in the comments.

Thank you for reading.

  • Vote: I like it
  • +315
  • Vote: I do not like it

»
12 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

We never miss a great blog. Thanks

»
12 days ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Wonderful blog, reading through it made me realize a lot of the mistakes I was doing during preparation.

In your section on choosing the right problems to do, you mention solving problems around the range of user rating+[200, 400]. Would using the Codeforces problemset (with built in rating and tag filter) be a good implementation of this practice method? If so, would the order of the problems matter? By default, the problems are ordered by recency, but there is also the option to sort by the number of AC which might be useful.

»
12 days ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

How would you suggest improving in dp? Sometimes, personally just knowing a problem is dp makes the problem easier because I just try to force a dp solution.

  • »
    »
    12 days ago, hide # ^ |
     
    Vote: I like it +8 Vote: I do not like it

    This is kind of a dumb idea but you can make a bot to give you random problems, where you increase the chance of getting a problem with dp tag by lets say 10%. That way, you still don't know if a problem is dp or not, but end of practicing more dp problems on average

  • »
    »
    12 days ago, hide # ^ |
    Rev. 2  
    Vote: I like it +11 Vote: I do not like it

    DP is discovering "subproblems". After that you should represent the subproblems as concisely as possible.

    The key is to build an intuition for where the subproblems are. Try to think about DP problems you’ve encountered before: why do certain structures naturally become subproblems, and what features of the problem might prompt you to think of them?

    • »
      »
      »
      12 days ago, hide # ^ |
       
      Vote: I like it +1 Vote: I do not like it

      Thank you for your detailed response! I will think more about these kinds of structures moving forward!

»
12 days ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Wonderful!

I was fortunate to have trained with your practice contests one year ago.

I completely agree with your definition of an appropriately difficult problem. I only participated in a school mock contest if I thought at least one of the problems was worthwhile. In my experience, skipping low-quality contests is necessary to maintain my mental health.

»
12 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Wonderful! This blog makes me face my plan. And I have a Question: How can we solve a problem? What is that we have to think of? And how to analyze a problem? I'm a Chinese student, and in yundou2026 traing camp, I meet you, and I want to get the first price of CSP-S.

»
12 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Nice blog!

I’m curious, how did you choose problems to practice? I know that Chinese competitive programmers often practice on qoj/luogu, but are there any lists of chinese problems that are particularly interesting and worth solving?

  • »
    »
    12 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    I don’t solve problems on Luogu.

    On QOJ, I only do problems from contest series that I trust, such as UCup and some regional OI contests.

    • »
      »
      »
      10 days ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Random question: do you have any comments on the premier list?

      • »
        »
        »
        »
        10 days ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        Where can I find this in qoj, and is this problem difficulty available for all problems in qoj

      • »
        »
        »
        »
        10 days ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        A very good problem selection. And I solved many problems among them when I was a contestant.

        If you are at least a Candidate Master, you can try it.

      • »
        »
        »
        »
        42 hours ago, hide # ^ |
         
        Vote: I like it +12 Vote: I do not like it

        Is there a way to find this list from QOJ.ac, without your comment? This is the only place I found this list

        Also, what do the difficulties Beginner/Easy/.../Hard correspond to e.g. in CF rating or IOI medal?

        Thanks

»
12 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

orz Au

Wonderful blog

»
12 days ago, hide # |
 
Vote: I like it +17 Vote: I do not like it

CNOI GOLD >>>>>>> IOI GOLD

»
11 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Where is the right place to train our coding ability?

»
35 hours ago, hide # |
 
Vote: I like it +26 Vote: I do not like it

UPD: For the free problem recommendation and additional problems for subscribing, I plan to release once per week in September.

I will continue if many people follow it and subscribe.

»
20 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Great Blog! And I have a further question: What are your thoughts on seeking training resources for Chinese participants who want to enter the provincial team? Now I just find problems in my seniors' submissions, and sometimes solve the latest problems on OJs.

»
15 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

This blog reflects great experience, and I learn so much from it. Thank you

»
13 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Useless blog. Another “do good, don’t do bad” sermon. Pick problems of the right difficulty, think harder, code yourself, learn stuff when you need it. Wow. Revolutionary. Next week: “sleep well before the contest.”