Please, try EDU on Codeforces! New educational section with videos, subtitles, texts, and problems. ×

antontrygubO_o's blog

By antontrygubO_o, 3 months ago, In English,

Disclaimer: as always, everything in this blog is just my opinion.

Some problemsetters don't take easy problems seriously. One very popular opinion is that the D2A-B problems are just stupid implementation exercises intended for beginners to learn how to code.

It's true that D2A-B problems are mostly like this on most platforms. This is one of the reasons why a lot of people don't like combined rounds: they think that solving D2A-B problems can't be interesting and just takes time which could be spent on solving fascinating problems of higher level. From point of view of most participants, easy problems just can't be good, because if problem requires some thinking than it's not easy enough for D2A-B level. Easy problems can't be interesting, they say!

This situation really upsets me. This kind of attitude from the community leads a lot of problemsetters to care about easy problems even less. At the same time, I am sure that easy problems can and should have nice ideas in them. Yes, even D2A-B level problems can need some observation/insight!

I will start with some examples of D2B level problems which I consider really nice. I recommend trying them! Some comments are under spoilers.

1325B - CopyCopyCopyCopyCopy

Comment

1300B - Assigning to Classes

Comment

1270B - Interesting Subarray

Comment

A few more nice D2Bs where you have to think a bit:

1305B - Kuroni and Simple Strings

1189B - Number Circle

1091B - New Year and the Treasure Geolocation

You may be surprised, but even D2As can have nice ideas in them! Here are some examples:

1326A - Bad Ugly Numbers

Comment

1305A - Kuroni and the Gifts

Comment

1269A - Equation

Comment

556A - Case of the Zeros and Ones

Comment

1174A - Ehab Fails to Be Thanos

Comment

Here are a few more nice D2A problems:

1325A - EhAb AnD gCd

1237A - Balanced Rating Changes

1206A - Choose Two Numbers

1189A - Keanu Reeves

1119A - Ilya and a Colorful Walk

I hope you found these problems nice. All of them require at least some insight/observation, and they are still easy enough for beginners and for D2A level. All of them have quite a short and clear statement, and you don't have to waste a few minutes understanding the problem's statement.

However, first problems in rounds aren't usually like this. Very often the first problems are just: Do what's written in the statement, or Bruteforce all possibilities to find the answer. Majority of D2A-Bs don't have any idea at all. Here are some "best" examples:

1281A - Suffix Three

1228A - Distinct Digits

1200A - Hotelier

1186A - Vus the Cossack and a Contest

1097A - Gennady and a Card Game

At this point a lot of readers may disagree with me. Some people may say:

Yes, these problems aren't interesting for you, but if there isn't any idea in these problems from your perspective, it doesn't mean it's the case for beginners. For them even these problems are tough and interesting enough. Implementation problems also can exist, and they are useful to learn how to code for beginners. After all, this is not a thinking contest, this is a programming contest!

And they would be right to some extent. However,

  • Codeforces is not a platform where you learn how to code. There are a lot of much better places to learn programming language syntax, and we are here to solve problems, not to learn how to code.

  • The first problems aren't only for beginners. All participants of the round solve these problems, and it's sad when from the very beginning of the round you are bored by the first problems, which turned out to be statement comprehension + implementation exercise. I am often upset when the first problems are such exercises, and get much more excited about the round as a whole and further problems if D2A-B are nice.

  • I think that the best way to make someone love CP is to show nice, cute, beautiful problems. Too standard/boring first problems may destroy wish to proceed in CP in beginners.

After all, the first problems are the ones that the largest number of participants will try to solve, and half of the participants won't even get past D2B. How can we not care about D2A and D2B then?

Yes, setting nice D2A and D2B which require some ideas and are still easy enough is hard. Really hard. But setting good problems is hard in general. If you decided to spend some time to make a good round you should spend some time and try to make all problems good. I believe that D2A and D2B level problems shouldn't be created like this:

I have to note that the situation now is much better than it was a few years ago, and that the quality of all problems, even of D2A-B has improved a lot since then. But I still hope that after reading this blog some of you will spend more time thinking on D2A-D2B problems before submitting contest proposal on CF :P From my side as a coordinator, I try to not let boring problems get into CF rounds, and I hope to become better at this in the future.

What are your thoughts? Should authors spend more time coming up with nice easy problems, or is it just a waste of time?

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

»
3 months ago, # |
  Vote: I like it +113 Vote: I do not like it

Too standard/boring first problems may destroy wish to proceed in CP in beginners.

I don't think those problems will destroy wish of beginners, as majority of real world even considers that kinds of problems "high thinking". In my current work I have many opportunities to see normal people studying/competing code for hiring test, and most of them aren't even able to think basic implementation design.

Can you believe even problems in your bad sample could make their brain spinning hard? Sadly it is "yes". I agree that problems with nice idea are more nicer than implementation problems in CP, but don't overestimate majority of people anyway.

  • »
    »
    3 months ago, # ^ |
    Rev. 4   Vote: I like it +110 Vote: I do not like it

    Furthermore, I think there are relative level of thinking. Even some of Div1D+ level problems praised by many red coders won't be interesting for some of super geniuses. Meanwhile, some people will even think N-queen problem is very interesting and discovery problem. Also people's problem taste differs by their strong and weak field.

    Is it even possible to say which problem is interesting in absolute term? I think criteria of interesting level is often determined by community consensus. I don't know which way is better for Codeforces, but at least I believe there is no absolute answer on these kind of topic.

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

    Can't agree more! McDic(orz) always has the best opinions!

»
3 months ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

A simple question may become a reading comprehension question. That's really a bit boring, however , it seems to be a trend。

»
3 months ago, # |
  Vote: I like it +480 Vote: I do not like it

I'm currently writing an internal document (or poem) for AtCoder writers about problemsetting, and one of the topics there was how to choose easy problems. This post is based on the document and the document is lengthy, so this post is also lengthy, sorry...

First I agree with you that we should "care" about those problems. However the meaning of "care" here may be different from you; it doesn't necessarily mean that we should use an observation-oriented problems. I believe we should have a certain philosophy about easy problems, and we should set easy problems based on the philosophy instead of setting random problems. Let me share my plan on easy problems on AtCoder.

My opinion for easy problems is different for different target audience.

  • AGCs (= CF Div 0.8) are mainly targeted for reds (but we keep yellows/oranges in our mind too and try to make it interesting for them too). Here I completely agree with you. When we set AGC-A problems, we try to maximize the "interestingness" (from reds' point of view), under the difficulty constraints (probably slightly higher than CF D2 AB). Thus, we try to include some observation in AGC-As.

  • ARCs (= CF Div 1.5) (recently most of them are sponsored but contests with orange circles are ARCs) are mainly targeted for yellows/oranges but we try to make it interesting for reds too. So, the philosophy of ARC-Cs is similar to AGC-As (but again probably slightly higher than CF D2 AB). We try to make ARC-ABs "harmless", that is, they may not be interesting, but also are not annoying. For example, avoid lengthy statements, avoid time-consuming implementation, etc. This way the impression of the overall problemset by the main target audience is determined by C-F because they don't even remember A/B after the contest.

  • ABCs (= easy CF Educational) are mainly targeted for blues and below who are serious about competitive programming and dream to become reds in the future.

Imagine that you are new to competitive programming. Unfortunately, solving only thinking-oriented problems doesn't lead you to reds (or maybe you can, but it takes longer time).

How to set educational problems then? What should beginners solve to improve? I'm also not a fan of statement comprehension problems. Making statements lengthy doesn't help people to improve. Based on my experience as a competitive programmer, some of the most important factors in the success in competitive programming are:

  • Observation skill during the contest; or math-puzzle solving skill.
  • Strategic behavior during the contest
  • Getting used to various typical patterns.
  • Fast and accurate implementation of not-so-long code.

The following things may help you, but turns out to be unnecessary (at least for TC/CF/AtCoder/GCJ/FHC/etc., the story may be different for IOI). As I don't enjoy these things personally, I try to avoid them in AtCoder:

  • Learning advanced algorithms.
  • Muscular implementation.

So, let's concentrate on four factors: [observation], [strategy], [typical], [speed/accuracy]. How to improve these skills?

  • [observation] : Try to solve challenging (relative to your skill) problems by yourself. This requires small number of problems, but you need to take each problem very seriously and spend long time for each.
  • [strategy] : Participate in actual contests.
  • [typical] : Solve lots of problems that require the pattern you want to acquire.
  • [speed/accuracy] : Solve lots of problems.

In our world, there are lots of easy problems, but high-quality hard problems required to improve [observation] are precious. Thus, my recommendation for beginners is to concentrate on [typical] and [speed/accuracy] by solving lots of easy problems, then gradually shift to [observation]. (It's probably a bit less interesting than [observation], sorry about that, but it's required to improve and I think it's much more interesting than "studying" mentioned below.)

To summarize, in contests targeted for beginners, I prefer the following style:

  • The problems are easy to get the idea from reds' perspective (so, it may feel "boring" for you).
  • The problems don't require any advanced algorithms; instead it focuses on typical applications of basic algorithms (or typical math questions).
  • Compete for speed and accuracy; I also recommend participants to read solutions by strong people, and see techniques used there.

The "accuracy" part may be unclear — recently I wrote one contest for that purpose (https://atcoder.jp/contests/panasonic2020/tasks).

Also note that we use the "quality > quantity" policy in AGC/ARCs but "quantity > quality" policy in ABCs because the most important thing is to solve lots of problems, so we try not to spend too much time.

Codeforces is not a platform where you learn how to code. There are a lot of much better places to learn programming language syntax, and we are here to solve problems, not to learn how to code.

One of the things I like about competitive programming is that we don't need to "study" (why do we have to study in holidays?). By "study" I mean learning programming, reading books, papers, etc. What we need to reach nutella is just solving problems and participating in contests — we don't need to study at all, we can get all necessary skills for competitive programming without them.

I grew up in TopCoder 10+ years ago — it was very interesting, every contest there felt like a once-in-a-lifetime event, and at the same time it gave me very helpful skills to compete on various international contests. Div1 contests were very thinking-oriented and nice and helped me improving [observation], and also the scoring system there and the tricky system tests were great for beginners and helped me improving [speed/accuracy] and also [strategy]. (I think we can learn [typical] on most contests.) That is my utopia and what I tried to achieve as an AtCoder admin. Personally I prefer a bit more [observation] in recent D1 SRMs, but I still recommend SRMs, especially for beginners.

»
3 months ago, # |
  Vote: I like it +13 Vote: I do not like it

I know I am still in Div2, yet I have given a substantial number of contests and consider my skill level decent enough to comment on this. The current system is good.

AtCoder has beginner contests rated for contestants with rating <= 1999. A 1800+ rating is a decent rating on both AtCoder and Codeforces. And in AtCoder Beginner contests, problems A and B are literal reading and typing tests. There is almost no thinking involved at all. That is something I agree should not happen.

Codeforces Div2 A and B are usually better (even Div3 A and B are better than AtCoder Beginner contests). So I quite like the current CF system. They are meant to be easy problems, but not completely trivial.

As an Expert, I am supposed to be able to finish submitting A and B in under 20 minutes. Grandmasters should be done with both A and B in under 5 minutes. If it takes any longer, then the questions are tougher than they should be.

However, first problems in rounds aren't usually like this. Very often the first problems are just: Do what's written in the statement, or Bruteforce all possibilities to find the answer. Majority of D2A-Bs don't have any idea at all. Here are some "best" examples:

Yes, the examples you cited are truly bad. However I have found them to be exceptions rather than the norm. Maybe the usual Div2 A,B questions aren't as good as the examples of good Div2 A,B you gave but they are still good enough. I have never seen a "no thinking — just implementation" Div2 B task at least.

I am often upset when the first problems are such exercises, and get much more excited about the round as a whole and further problems if D2A-B are nice.

That's very subjective. If I get such a contest where A, B are very easy, then I instead find it nice to be able to finish them off in less time and moving onto the interesting problems worth more points.


Obviously in a Div1+2 contest, problems A and B may be annoying for Grandmasters at least. But I have usually found Div1+2 A and B to involve some thinking at least, and making them any harder may cause problems for newbies and pupils.

»
3 months ago, # |
  Vote: I like it -12 Vote: I do not like it

If we're talking about boring problems, this one deserves a mention despite being 2000* D2E:

1185E : Polycarp and Snakes

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

    Yup, it's boring, but that's probably true of any implementation problem. I especially hate problems whose general solutions are easy to come up with, but their whole difficulty lies only in implementation and corner cases.

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

    bro this problem is very interesting and not boring. it checks your ability to think about implementation.

»
3 months ago, # |
  Vote: I like it +35 Vote: I do not like it

I think it is quite important to embrace the variety of problems.

Perhaps the word "genre" is suitable to describe this: we have implementation problems, algorithmic problems, observation problems, also "story-rich" problems — which are hated by most of participants, especially the reds.

I believe we are contributing here to the community, not to red users or any specific group of users. If we observe the community well, we can easily find people attracted by different "genres". As a result, we are meeting different contributors and different participants in every contest.

It is rather precious of Codeforces being a community of competitive programming. So I don't want only a single idea or aesthetics exists. We should take the interest and need of most users into account, from newbie through LGM.

»
3 months ago, # |
  Vote: I like it +100 Vote: I do not like it

everything in this blog is just my opinion.

while you quoted my opinions without any notice?

Anyway, I'm not saying D2A-B should be tedious implementation problems. Most cases, problem setters' goal (make the first problems simplest to reduce the amount of work) and beginners' goal (get used to general thinking methods used in programming contests) to go really well.

https://atcoder.jp/contests/abc154/tasks/abc154_c

https://atcoder.jp/contests/abc151/tasks/abc151_a

https://atcoder.jp/contests/abc156/tasks/abc156_b

https://atcoder.jp/contests/abc159/tasks/abc159_c

https://atcoder.jp/contests/abc152/tasks/abc152_b

Those who are not yet used to make simple problems, or some low rate writers, or crazy storylovers often make unnecessarily complex problems. These problems make nobody happy (writer has to work more, competitors should spend more time reading the statement, non-English speakers get bored with English, beginners cannot find what is asked in the statement).

https://atcoder.jp/contests/abc156/tasks/abc156_a

https://atcoder.jp/contests/abc151/tasks/abc151_c

https://atcoder.jp/contests/abc153/tasks/abc153_c

https://atcoder.jp/contests/abc153/tasks/abc153_d

By the way, I completely agree with rng_58's this stance:

We try to make ARC-ABs "harmless", that is, they may not be interesting, but also are not annoying.

As a participant, I don't think anything about the easiest questions and forget them as soon as I submit the solutions, except when the statement is too long. In terms of this, Codeforces has too many harmful problems. I want the statement of easiest problems at most 2 lines.

Finally, for students who should make money by writing problems, it is really important to focus on producing problems which are easy to prepare (and these problems automatically become concise and essential). I dare not try to work on preparing easy problems which requires longer problems statement, checker, and complicated test data, if I don't get paid more for working on this.

So finally, I came to this easy problem:

https://atcoder.jp/contests/yahoo-procon2019-final-open/tasks/yahoo_procon2019_final_a

(Given four integers $$$H,W,A,B$$$. You are going to place two $$$A \times B$$$ small rectangles inside the $$$H \times W$$$ large rectangle (the place is chosen randomly.) . Calculate the expected area of the intersection of the two small rectangles.)

»
3 months ago, # |
  Vote: I like it +144 Vote: I do not like it

Most of interesting div2-AB problems you showed are nice mathy puzzles but they discourage absolute beginners who expect some coding. Find value(s) that satisfy some divisibility or GCD property? By making it non-boring for us you make it very strange for beginner programmers. Or maybe it's ok, hard to say.

Also, div2A shouldn't have such a long statement as 1305A - Kuroni and the Gifts which you gave as an example.

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

    I feel like the 1305A statement is just weird in general. I feel like the problem itself is not hard to state concisely.

    You are given two arrays $$$A$$$ and $$$B$$$. You may reorder the elements in each array in any way you like. Then someone comes along and calculates the array $$$C$$$ with formula $$$C[i] = A[i] + B[i]$$$. Your goal is to make all the elements of $$$C$$$ distinct.

    The statement above should be polished a bit, but I think it is very possible to explain it in 5 sentences so that even a beginner will understand. The current statement feels like someone decided that it should be plastered with examples and more explanations, "which is better because it "explains more"". I don't think it's necessarily a bad thing, but I think it can make things worse if it's not done properly.

»
3 months ago, # |
Rev. 2   Vote: I like it -104 Vote: I do not like it

1) Anton is a clown. Tomorrow I will write a blog "on antontrygubo_o's blogs".
2)

Again, easy enough, but you still need an observation: if there exists some interesting segment, there exists one of length exactly 2.
Again, you need an observation that the answer is the difference an−an−1 in the sorted array.

These observations aren't interesting.

  • »
    »
    3 months ago, # ^ |
      Vote: I like it -96 Vote: I do not like it

    P.S. Antoine, please stop your propaganda of turning cf contests into math contests. Why do you think the implementation part can't be challenging? Why do you think the implementation part is the least important part of a problem? bruh, there aren't any dp problems among your problems; do you consider it as a good situation? I think your appointment as a coordinator was a mistake from cf staff.

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

      1) Is it really necessary to become personal when the discussion here is about the problems? If you do not agree, please, say your opinion, don't just offend Anton. I think his position is adequate and your comment is meaningless.

      2) Maybe they are not for you, but for me they are. And much more interesting than some basic implementation problems.

      About the implementation part. This is that part for which you don't need to use a brain a lot. Sometimes the implementation part is interesting if you can come up with some smart way to reduce code or something, but in most cases, it is not creative. I like writing solutions for cancer problems/creating cancer problems because I can get some (maybe masochistic) pleasure from it, and I just enjoy it. Nevertheless, I think that the implementation part is not as important as you write. The problem is good if and only if the idea behind it is good...

      • »
        »
        »
        »
        3 months ago, # ^ |
          Vote: I like it -89 Vote: I do not like it

        don't need to use a brain a lot

»
3 months ago, # |
  Vote: I like it +7 Vote: I do not like it

The only observation Div2A should need is that the problem itself exists

»
3 months ago, # |
  Vote: I like it -11 Vote: I do not like it

Nice topic and special thanks to saying it, i USED TO don't care about D2A-B in my proposals, and i am willing to change my D2A-B(as they are shamefully useless), so maybe its the reason i dont get passed of coordinators =P

But I still hope that after reading this blog some of you will spend more time thinking on D2A-D2B problems before submitting contest proposal on CF :P

Probable i am one of the "some of you" :)

Now i am just curios about how many months should we wait before getting any response from coordinators in our proposals? i know there is too many proposals and too few coordinators, and i know coordinators have life and cant be a checker bot and checking proposals takes time, but i really hoped for some response in a month or two months at most.

I still have some questions, would be grateful if anyone answers.

How many proposals do you(or whoever answers, being a coordinator is necessary =P) check in a week, and how much time you spend on them.

»
3 months ago, # |
  Vote: I like it +28 Vote: I do not like it

About the post: I completely agree to rng_58's reply.

Offtopic: I really enjoyed djm03178's task B from Round 620. It required a nontrivial but easy observation about the solution. Plus, it asked for a healthy amount of implementation which good coders can finish with relative ease.

1304B: Longest Palindrome