Wind_Eagle's blog

By Wind_Eagle, history, 2 years ago, translation, In English

Hello, Codeforces! I, like many of you, read blogs periodically. Lately, blogs from low-rated users who ask me how to raise their ratings have been catching my attention. I want to tell you a little bit about my opinion on these blogs.

So what do these blogs look like? Usually this is a blog with a title something like "I need help right now!" or "How to improve my rating, help me!" When you open this blog, you see the most detailed description of the problem, such as: "I have solved 500 problems, but no improvement" or "I have solved 100 problems with rating >= 1500, but my rating is not increasing". And in the comments they usually write "you haven't solved enough, solve more" or "solve more difficult problems". In my opinion, this is incorrect and misleads such users.

So, imagine that you do not know anything at all about sports programming, or even about the basics of Olympic math. You at best (because many people don't even do that) have learned a programming language at a basic level (really, who needs templates and classes), such as C++. And so, you decide to become a sports programmer to get a job interview enjoy solving interesting problems. Imagine yourself as this person. Can you? No, imagine please, it's important.

When you have imagined this, imagine now that you have no friends at all who know what programming is. "Programming, huh? Is that edible?" Well, I'm kidding, of course, but it could very well be that no one around you is into programming. So, now there is a question. How to improve?" "What's a stupid question?" — you ask, "of course, just go and solve problems!" Just everything, and maybe some ladder (which I don't know much about). So, I declare: in my opinion, this is very bad advice, which will only harm someone who starts his way in sports programming. You have imagined yourself as a beginner, haven't you? Now think about it: if you only know high school math, can you solve D2A? If you think you can, I'll let you in on a secret: if you are not a born genius in sports programming, you probably can't.

Let me tell you a little about why. As can be seen from my profile, I'm from Belarus, from the city of Mogilev. In this glorious city there is a glorious gymnasium number two, where my wonderful EIK teacher teaches. She has many Olympiadists, both beginners and very experienced, like Dmi34, and a bunch of experienced, among them, for example, me, as well as another international master and international grandmaster. And I can tell you: if you take the beginners now, I'm not sure that they could solve even D2A in the first year at once. I'll explain why.

The whole point is that even D2A should actually be approached gradually (unless, of course, you have experience in math olympiads, say — then solving D2A in general is not a bad idea). Back to our mental experiment — take any random D2A from the last two years.

Totally randomly I chose round 672 and Problem A from it (1420A - Cubes Sorting). Think about it: How easy is it for someone who only knows school math to solve this problem? For example, in our university department we have a small section (for one or two lectures) devoted to permutations, and from this knowledge it is easy to solve this problem. But if you only know school math (and you have an ordinary, unremarkable school), then solving such a problem will obviously not be that easy. Actually, understanding that an unsorted array can be sorted by a bubble sort in n * (n-1) / 2 operations is not that hard, if you reason logically. As I see it, it is harder to show that for an unsorted array this does not hold.

Or round 697, problem A (1475A - Odd Divisor). Of course, this problem can be solved by simply writing out all the numbers on a piece of paper and finding a pattern. But here you need to know what is decomposition of a number into prime factors, know that it is singular, and so on. Thinking back to the greedy algorithms, I can mention the problem from round 765, problem A (again chosen at random) (1625A - Ancient Civilization).

My point is this. You need to know mathematics for sports programming. Now imagine: someone has solved, say, 100 problems A. Consider that most of them do not contain any new and interesting ideas at all, but just, as they say, ad-hoc. So what will one learn from these problems? I'm not sure, but it seems to me that simply nothing! One will remember twenty ideas, but the twenty-first will still be different. Going back to our imaginary newcomer: he has no one to ask, no one to ask to explain. No one to explain the standard ideas and approaches. So what does he have to do but cheat to write blogs?

The situation with problems B, C, and D is even worse. To solve them, you usually need to already know the standard ideas. The problem is that in order to practice these standard ideas, you need to solve problems on these standard ideas, not immediately D2C — D2D. Imagine if you were learning a segment tree right away from a 3000 difficulty problem. That's not very good.

To conclude the first part of the blog: Codeforces — is definitely not a place for beginners to practice. While more experienced users can practice here, it is hardly suitable for beginners. What to do, I do not know, and why I do not know, I will explain later.

Now let's move on to the second part. Now I want to explain why I think the Codeforces complexity approach is a bad idea.

Let's take a look at a few (again, totally randomly chosen tasks). Let me tell you right away: this will be my subjective opinion. Let's look at problems 858B (858B - Which floor?) and 996B (996B - World Cup). I consider the first one very simple for its complexity, and the second one — very difficult. I solved both problems long ago, but I only remember that when I was a pro, I solved the first one, although with difficulty, but when I was a candidate master, the second one was very difficult for me — I don't even remember if I solved it or not!

This is not to say that the tagging system on Codeforces is not very good, and often confusing. For example, in the DP topic you may come across a prefix-sum problem, and in many tasks the tags are put on the principle "here is a problem on ST/DP/bit operations. But it can be solved with flows. Let's put the tags: graphs, flows. Oh! You can also use ternary search! So let's do it!" So tags really don't always reflect the topic of the problem.

My point is this. You have to train by theme (but tags are also broken), not by difficulty. Especially when you're not that experienced yet. Don't be afraid that you can't do ad-hoc tasks — the main thing is to be good with standard ideas.

Many commenters who write "solve more problems" have, in my opinion, simply (and that's okay) forgotten what it's like to be gray or green. And that's okay: I don't remember solving while I was down, either. But looking at the way my instructor has been giving exclusively standard problems and approaches for a year or two, I'm starting to realize that she's probably doing it right.

Going back to our example — how would such a person know which topics are standard and which are not? At most he can only know the names of the topics. And by the way, apparently, this explains so many gray people who learn the Cartesian tree and Mo algorithm — they don't quite understand what things are needed at what level. And why don't they understand? In my opinion simply because there is no one to explain. So if you're a newbie/pupil and you're reading this, know — you need to learn approaches, not algorithms. And algorithms are better not to learn, but to understand. You should probably learn an algorithm when you encounter a problem at least once/twice in which you can bring the solution to completion, completely and independently, if someone had written the algorithm for you. That is, you have thought up all the steps, all the math, reduced the problem to a well-known algorithm — then you can open it and try to understand it. By the way, if you can't understand it, you can learn it for now — it seems okay to me. You can go back later for understanding (when you have more experience). When I was an expert, I didn't understand the segment tree (really, I was a high school student then, and not even a senior).

So, smoothly passing to the main idea of this blog — I can't imagine how you can practice without a coach. Of course, when all the basic ideas are studied, and the algorithms are perfected, you can move without a coach. But, say, to an expert or even to a candidate master will be much harder without a coach. I know that there are a lot of people who have studied on their own, and reached the heights. It seems to me that you — this is more of an exception to the rule than the rule. I'm very glad that you're doing well. But personally, I realize that without a coach, my progress would have been much slower.

I know that if people who came here to train for interviews. Guys, this is not the place for that at all. That's what LeetCode was invented for — there's a bunch of great problems to prepare for, I've solved a dozen or two myself.

Lastly: in my opinion, Codeforces should decide: should it still be a training ground for beginners, or should it only be a training ground for more senior ranks? Because if it's supposed to be a training ground for greys/greens as well, it doesn't seem to be. Because Educational rounds aren't Educational at all, they're regular Div. 2 rounds, which are only slightly more standard in terms of ideas and approaches. Even Div. 3 rounds, which are designed for greys and greens, have recently started to contain ad-hoc rather than standard tasks again. I understand that this is done for ranking consistency. But let there really be simple tasks for newcomers. In the Edu section there are problems on standard algorithms — believe me, learning these algorithms won't do much good for gray or green.

Therefore, if one wants to create a more favorable environment for beginners, make separate, perhaps unrated, practice rounds. I understand that a lot of effort is put into each Codeforces round by the authors, coordinators, and organizers (myself the author of two rounds and co-author of another one). Maybe that's why Codeforces will probably remain what it is. And you know what? I'm only going to be glad. Surely (but I don't know for sure), there are plenty of places for newbies to train. Let Codeforces remain as great as it is now, with ad-hoc challenges. In my opinion, that's what makes the rounds so interesting and exciting (just please don't make all the tasks on one topic. I won't give you examples, but there are some. Believe me, it's not cool).

Thank you Codeforces for being there!

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

| Write comment?
»
2 years ago, # |
  Vote: I like it +195 Vote: I do not like it

Many commenters who write "solve more problems" have, in my opinion, simply (and that's okay) forgotten what it's like to be gray or green

In my experience, many commenters who give advice on these threads are grey or green.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    It's because most of the times there is no high rated person that even responds

»
2 years ago, # |
  Vote: I like it +14 Vote: I do not like it

a question: as a problem setter, would you want at least div2A/B problems be more implementation-heavy ("do-what-it-says Q"), or one-observation-kill questions?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +22 Vote: I do not like it

    As a problem setter, of course implementation heavy, because it is much easier to come up with. One-observation-kill problems are much harder to make. For me, to make D2A is as hard as make D2E.

»
2 years ago, # |
  Vote: I like it +31 Vote: I do not like it

I think using USACO Guide is one of the best ways to "learn approaches", also for grays and greens.

»
2 years ago, # |
  Vote: I like it +39 Vote: I do not like it

if you take the beginners now, I'm not sure that they could solve even D2A in the first year at once.

wat

So, smoothly passing to the main idea of this blog — I can't imagine how you can practice without a coach.

lol

I understand that you have no personal experience practising without a coach. But now I wonder if having such ridiculously slow progress is precisely caused by practising with a coach? After all, schools take many years to teach pupils some basic math and other subjects. And this is normal, because the compulsory education can't abandon anyone and "a convoy sails with the speed of the slowest ship". However is this really true for fun hobby activities, where people are much better motivated and are able to self-study successfully?

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    I think it has more to do with the fact that having a really good grasp on a basic subject is better than an "overview" of stronger subjects. As such, spending another week or two is better to cement a base in a subject.

    About D2A's — I believe that a lof of the time they are solved faster is due to the intuition that "this should be not hard", and as such everybody tries to make harder-hitting assumptions. For example, (off the top of my head), half of last D2A's I solved fast because I knew that it was an "A" task.

    About a coach — have to disagree. I went with and without a coach, and you can see that that is the difference between march of this year and december. Even if you are well-motivated, you may not know that you lack in a subject, simply because you don't know it exists, and so on.

    But it you have different experiences, please share.

»
2 years ago, # |
  Vote: I like it +6 Vote: I do not like it

Wind_Eagle Can you provide any resource/link or some collection of problems based on standard techniques ?

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

The real answer is "just do USACO training pages".

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +57 Vote: I do not like it

    I really do not understand why people still recommend the USACO training pages. Seven years or so ago, that maybe made sense, but for the last five years at least, the USACO training pages have been incredibly out of touch with the current contest meta. The problems are too standard/derive difficulty from implementation rather than observations, and the coverage of topics emphasizes many topics that rarely show up (and never show up until 2000+ level) while omitting lots of topics that are incredibly important (off the top of my head, the most glaring omissions are segtrees/BITs and problems about trees). My impression is that if your goal is to consistently solve e.g. CF Div. 2 A-C's, the USACO training pages are just about the least effective form of practice you could use, short of not practicing at all.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +17 Vote: I do not like it

      Because 90% of grey/greens are too weak mind to actually solve problems instead of skipping the ones that are "too hard". USACO training pages forces you to do that.

      It doesn't matter what the meta is. It is about problem solving and building a mindset of "I have to solve this to improve instead of saying it's too hard and skipping it". Do you think segtree is in div2 A-C?

      My impression is that every random red thinks to just say "solve more problems" and a guy goes off and solves 1000 div2 As and asks why he is grey. And then the red says "oh just solve problems ABOVE your level" and the grey goes off and looks at 100 div2 Cs and solves 30 and says the rest are too hard and 10 contests later wonders why he is stuck in green.

      On the other hand I have never heard of anyone who solved the first 5 chapters who wasn't at least cyan.

»
2 years ago, # |
  Vote: I like it +9 Vote: I do not like it

I honestly relate to this blog so much.I believe my first and most fatal mistake is described on the fourth paragraph(you can see my blogs).Although i am not really sure whether having friends can really help you.At some circumstances,they can help.However,most people i know that does CF do not really care about my struggles.They will just reply me with one syllable word.They might sometimes ignore me and grind with other people :D (probably because i am a depressed kid with little to no capabilities on doing OI problems so they think i am not worth of their time,i mean who knows)

if you are not a born genius in sports programming, you probably can't.

About this,i am not sure whether you are trying to imply that you can not be tourist if you are not meant to,even though you have infinite time and infinite energy.Most people will say that talent is non-existent.

One will remember twenty ideas, but the twenty-first will still be different.

This honestly applies to any level i must say.Especially DP problems.I believe noone can solve every DP problems in existence.

Final words,i must say that in order to improve as a newbie,one must have a suitable environment and full support from others.I believe people should somehow test their mindset on whether they are suitable for it.You know sometimes this community might be a little bit demotivating.One wrong step and everyone will cancel him/her.This should be somewhat painful for newbies.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +37 Vote: I do not like it

    Your profile screams "I like my daily streak and solve easy problems or copy some solution to keep it". I'd be willing to watch a training session of yours over discord at some time just to prove you're not actually solving many of the problems you have AC.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    If after solving 1200 problems you have only 1200 rating, you are doing something wrong.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      It's not like i am unaware of this but ok.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +47 Vote: I do not like it

      I have solved over 2600 and only have 2500 rating. I must have done something really wrong :(.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I wish it worked like that.

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Still you would have been behind tourist even if it worked like that :O

»
2 years ago, # |
  Vote: I like it +11 Vote: I do not like it
  • »
    »
    2 years ago, # ^ |
      Vote: I like it +9 Vote: I do not like it

    Главный плюс этого сайта это культурные дискуссии на форумах, всем рекомендую. Много чего узнал.

»
2 years ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

I used to learn algorithms when I was younger, and I didn't have big success in programming (I was quite good at maths tho, so I usually managed to solve something on olympiads). But after some time I decided to start understanding ideas of algorithms, and from that moment my level at programming began to increase rapidly. The main problem of learning algorithms is that you try to find these algorithms in problems,but problems on olympiads and rounds are not just set of different algorithms, they are about ideas and methods. So one of the most important things to do in learning is to stop learning algrorithms and start to discover ideas in standart problems and algorithms.

»
2 years ago, # |
  Vote: I like it +9 Vote: I do not like it

I knew only school mathematics, the existence of Wikipedia, acmp, codeforces. And that was enough for me to become 1600+.

»
2 years ago, # |
  Vote: I like it +1 Vote: I do not like it

I really strongly disagree with the blog and I think this blog just provides the best excuse for green/grey to stay where they are or drop cp. But proving my point would be mostly anecdotal evidence and they would work better I'm a candidate master or at least expert. So, I think I would wait to complete this comment till then.

»
2 years ago, # |
  Vote: I like it +11 Vote: I do not like it

I read the blog and see that getting a coach might actually help and I agree. In my experience, I joined classes before starting cp for 2 months and they only used to teach leetcode problems. Does this count as a coach ?

»
2 years ago, # |
Rev. 2   Vote: I like it +17 Vote: I do not like it

Now imagine: someone has solved, say, 100 problems A. Consider that most of them do not contain any new and interesting ideas at all, but just, as they say, ad-hoc. So what will one learn from these problems? I'm not sure, but it seems to me that simply nothing!

No one to explain the standard ideas and approaches.

I can't imagine how you can practice without a coach.

If someone has solved 100 ad-hoc problems, he has improved his skill of solving ad-hoc problems. If during this time he has encountered problems on standard ideas but failed to solve them, he should have read their editorials, made sure he understood the process and ideas behind the solution, with some additional googling on the subject if necessary. So he was introduced to these ideas he lacked, just as he would have been when solving Olympic math or training under a coach supervision, albeit in a non-systematic way. If he hasn't encountered enough problems on standard ideas, well, he didn't learn them, but he progressed along this ad-hoc difficulty range on Codeforces, gained useful experience, and moved closer to standard ideas.

This may not be the most efficient strategy, but I don't see how it might not work for people who do solve div2A from time to time, and I don't think I've added anything that isn't usually suggested. I'm not speaking from experience, I've had both a coach and Olympic math background when I've started programming, but I'd like to understand why you think such training would be hopeless for an average person. Learning Cartesian tree at gray level is another story, I don't think one would see it very often in div2 A-C editorials.

»
2 years ago, # |
  Vote: I like it +5 Vote: I do not like it

I don't see a point in CF becoming a "programming coach" if that's what you want.

There is nothing special about coaching programming, it's just general problem-solving. One needs an ability to reason logically way more than a coach. Unfortunately, most people lack it, and having a coach won't change anything.

Besides, most beginners are not truly interested in problem-solving, and the imaginary people that you are talking about are already an expection and can do just fine without a coach.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    "I don't see a point in CF becoming a "programming coach" if that's what you want."

    No, of course no :) Where did I say something like that?

    "One needs an ability to reason logically way more than a coach."

    I strongly confirm that it is much better when someone will give you, say, 50 accurately chosen tasks based on standared ideas and methods to teach you this methods, that you will solve 200 random tasks. I think that coaches make education more efficient. They can explain to you something or, as I said earlier, give you some tasks.

    I want to add something to the previous paragraph. Do you really think that soving random tasks is not worse that solving carefully chosen tasks?

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it +6 Vote: I do not like it

      I am somewhat good at remembering ideas, so it does not make much difference. Let's say I pick a random problem for practice.

      • If it is immediately obvious to me (because I already saw this idea) then I may skip implementing it (altho implementing obvious problems is also useful for speed). This way I don't waste much time on the problem selection process.

      • If it is not immediately obvious then I already consider it interesting. By solving it, I will likely learn something or at least recall something important. Either way, practice time well spent.

      I can see how a coach will save me a little time by discarding boring problems; other than that, I'm not sure what benefits are there.

      • »
        »
        »
        »
        2 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        You are already master; and my blog was about users with 1600- rating. To remember basic ideas for them it is better to have someone who can explain and choose some tasks with these basics.

        • »
          »
          »
          »
          »
          2 years ago, # ^ |
            Vote: I like it +14 Vote: I do not like it

          Everything is exactly the same for the users with 1600- rating. They are perfectly capable of successfully training without a coach.

          There's just one major risk: loss of motivation and learned helplessness. The number of possible tricks in D2A and D2B problems is reasonably finite. But beginners are going to encounter a lot of unfamiliar tricks in their first contests. This may give them a false impression that whatever they learned in their first contest was "useless", just because this information didn't immediately help in their second contest. Then after the motivation is lost, training becomes much less efficient. And if people don't really believe that solving a problem to learn a new trick is useful, then they are less likely to remember this trick upon encountering it in future contests.

          Other than this, the training process is rather straightforward. It's enough to just participate in contests and upsolve problems. Read editorials. Read comments under the contest announcement/editorial blogs. Post comments to ask questions if anything is not clear. No coach is really needed for that. Sooner or later, the coverage of known tricks will be good enough to quickly solve a large percentage of easy problems in contests.

    • »
      »
      »
      2 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      In case you are worried about beginners learning advanced algorithms before it's time, then it should not happen with the random problems practice strategy. Surely there are no 800-rated Mo problems on CF.

      I also think that all ideas that appear in contests at a certain level are useful and worth learning. By forgetting one of them you risk not solving a similar problem later, even if the idea is super rare. In fact, coaching "carefully selected" topics becomes less helpful as the contests become more randomized in this regard.

»
2 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

_ ~~~~~ there are plenty of places for newbies to train_ ~~~~~

What are those? Give us some names so that we can train.

  • »
    »
    2 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    If you still can't solve D2A problems on Codeforces, then you can give AtCoder Beginner contests and CodeChef Starter contests a try. The easiest problems there don't have any "puzzle" component at all. For example, the yesterday's CodeChef START33 contest included this problem. The last weekend's AtCoder contest included this problem. Such problems are a lot more approachable and maybe you can successfully solve them. When there's no puzzle and it's immediately clear what need to be done, you can work on improving your programming language skills. The blog also mentions LeetCode, but I haven't tried it myself.

»
2 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I followed your advice and tried to solve some standard problems by topics on other website,I have to admit that comparing to solve many ad-hoc problems on codeforces,the former way seems more suitable for me,thank you!