Блог пользователя rot

Автор rot, 22 месяца назад, По-английски

I've just hit my goal of reaching yellow on Codeforces. Thus, I'm celebrating by sharing with everyone what I've learned over the years while trying to improve.

I've done a lot of research on my own when I was at a lower rating, constantly googling and looking at blogs to try to come up with the "optimal practice strategy", and failed every time. So, I think my experience in failing is going to be very valuable to a lot of people reading this.

Let's imagine a very simplified case of what happens when we're doing a problem. When solving a practice problem, these combinations of things can happen:

  1. Solve? Yes/No
  2. Tried a lot of ideas? Yes/No
  3. Used the editorial? Yes/No

Now, here are the simplified rules I follow to tell if I'm improving or not.

  • If you did not solve, did not try a lot of ideas, and did not use the editorial: you did not improve.
  • If you did not solve, did not try a lot of ideas, and did use the editorial: you did not improve.
  • If you did not solve, did try a lot of ideas, and did not use the editorial: you did not improve.
  • If you did not solve, did try a lot of ideas, and did use the editorial: you did improve.
  • If you did solve, did not try a lot of ideas, and did not use the editorial: you did not improve.
  • If you did solve, did not try a lot of ideas, and did use the editorial: you did not improve.
  • If you did solve, did try a lot of ideas, and did not use the editorial: you did improve.
  • If you did solve, did try a lot of ideas, and did use the editorial: you did improve.

In other words, you can tell if you improved by: (tried a lot of ideas) && (solved || used editorial)

In my experience, this has been an easy, simple, and accurate test to determine whether a practice strategy works (or not). For example, let's think about some of the common tips for improving and think about why they work: solving problems around your level. When you solve problems around your level, it typically takes 20-30 min+ of trying your own ideas, and you finally either solve it or you fail and read the editorial. According to my rule, you improve in both cases anyways, so this is an effective strategy.

Now, what strategies don't work? Let's think about solving problems that are too easy. You get the right idea in maybe around 5 minutes, maybe implement, and you're done. You didn't try a lot of ideas. You didn't improve. Now, how about problems that are too hard? You try maybe one or two ideas, get stuck, and can't think of anything else. You didn't try a lot of ideas. You didn't improve, regardless if you try to read the editorial or not. What about studying a lot of algorithms in your free time? You're only reading ideas, and not trying a lot of ideas of your own. You didn't improve (however, the rules imply you do improve if you try to come up with the algorithm on your own first, then read about it after).

But, why is trying a lot of ideas on its own not sufficient for improvement? Because if you don't resolve why those ideas do/don't work, they were pointless. That's why reading the solution or actually getting an AC after you've tried ideas is necessary, because you confirm whether you were right or not.

Finally, I know improvement isn't just a simple yes/no, but I think my heuristic (?) is a very solid starting point for many people here struggling to understand why they're not seeing the results they want.

Bonus
  • Проголосовать: нравится
  • +422
  • Проголосовать: не нравится

»
22 месяца назад, скрыть # |
Rev. 2  
Проголосовать: нравится -183 Проголосовать: не нравится

If you use editorial then you did not improve, regardless of first two factors.

What about studying a lot of algorithms in your free time? You're only reading ideas, and not trying a lot of ideas of your own. You didn't improve.

lol

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится +27 Проголосовать: не нравится

so basically what you're saying is that $$$3, 6, 7$$$ are good numbers?

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

The solutions provided in the editorial are often not obvious. I have often seen grandmasters resort to brute force solutions, even when better approaches exist for problems A, B, and perhaps C, as mentioned in the editorial. Trying to understand the editorial can be time-consuming and "may" not yield any benefit in my case. Often, reviewing a few winners' solutions—especially those who submitted the fastest—can provide insights into whether I am missing important facts or recurring patterns that they already know, which can help avoid wasting too much time if that pattern or idea repeats.

  • »
    »
    22 месяца назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    I agree. Some editorials can be confusing. I used editorials as an example, but the main point of my blog is you should be trying to correct or disprove your own ideas that you come up with, and there are many more ways to do that than just editorials (asking others, getting WA/AC, looking at tests).

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

If you did not solve, did try a lot of ideas, and did not use the editorial: you did not improve.

why

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Thanks, will implement this into my practice route.

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Good way to get it across!

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

A note : All the you did improve. are not same. Lets keep aside the problems that you solved, without trying much (If you did solve, did not try a lot of idea)

Solving all by yourself > Solving with minor hints from editorial or other sources > Solved after seeing major part of editorial, or the whole editorial.

»
22 месяца назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

I've just returned to CP and have been solving 2000-2200 rated problems (mostly none from div3s, those are hella inflated, although I'm growing concerned that those from div2 are inflated too, and there are other situations in which rating of a problem is just inflated) for a few days now and I just realise that in practice more often than not I can still figure out 2200s but not in a time consistent for contest (at least ~1 hour, max so far that I still managed to solve with no editorial was around 3h and a half). I find the "try a lot of ideas" quite a subjective factor tbh. What is an idea? What is only a continuation of an idea?

  • »
    »
    22 месяца назад, скрыть # ^ |
    Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    bro what the hell you basically have just as many solved as me in nearly any rating bucket... yeah. Wow. Uhm.

    • »
      »
      »
      22 месяца назад, скрыть # ^ |
       
      Проголосовать: нравится +3 Проголосовать: не нравится

      Without getting too deep into philosophical arguments, let's say an idea is how Google defines it: "a thought or suggestion as to a possible course of action." In my opinion, this would mean continuations of ideas also require new ideas of their own, making them ideas as well. But yes, trying to define what "a lot" is is very subjective, and that's why it's practically impossible to define what the optimal practice strategy is. My recommendation is to do what you think is a lot, which, again, is highly subjective and may be prone to self-deception.

      But, as long as you're having thoughts like "Maybe I can do $$$A$$$. Oh, that won't work because of $$$B$$$. I can fix that by doing $$$C$$$. Oh, $$$D$$$ breaks everything. I wonder if $$$E$$$ would fix that. (get WA/AC, repeat)", your intuition should become more precise and you'll naturally generate less wrong ideas over time, since you understand why they won't work. This is really what makes the most difference in contests: being wrong less often and being able to correct yourself, rather than magically getting the right idea popping into your head the instant you see the problem.

      Also, I'd take my Codeforces solves with a grain of salt if I were you. I participate in ICPC and solve a lot of problems for that on other platforms. So, my total solve count is significantly higher than what you see here. But yes, rating inflation is an issue, so what I've been doing to find quality practice is only doing problems that appeared in Div. 1 contests in the past 3 years. You can filter for that by using clist.by, like this.

  • »
    »
    22 месяца назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    so 2000 is not true it's really 1600?

    • »
      »
      »
      22 месяца назад, скрыть # ^ |
      Rev. 2  
      Проголосовать: нравится 0 Проголосовать: не нравится

      if you are doing them from div3s, yeah I'd say around there, maybe 1700-1800. Like, not a lot of people even get to them in the first place (they are likely the very last problem or 2nd last problem) , so it doesn't even matter if it was doable, the system will rank it high. Furthermore I believe the system doesn't have a lot of people with that high of a rating to truly say that. Like it's in a way a sampling problem.

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится -8 Проголосовать: не нравится

I believe that the rating on Codeforces largely reflects one's ability to observe and understand dynamic programming (DP) and greedy algorithms, which essentially boils down to the ability to guess the problem. However, focusing too much on the rating can prevent you from learning many data structures. I've seen an orange-rated friend who doesn't know segment trees but is proficient in DP; he can actually guide me on how to use segment trees to optimize certain parts of my DP solutions. On the other hand, I find the problems on AtCoder to be excellent. They don't try to be fancy; they present the problems with mathematical formulas in a very concise manner, allowing you to learn a lot beyond just obvious DP and greedy techniques. In contrast, many problems on Codeforces are quite difficult to understand (although I admit that my reading skills contribute to my low CF rating), which is not conducive to learning.

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

well I tried last time your binary tree thingy and dropped to Specialist :)

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится +4 Проголосовать: не нравится

K map in the wild :o

»
22 месяца назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Cool. This should resolve the debates people have about reading editorials and "when" to read editorials and make the catalog just for that alone.