Nxxlt's blog

By Nxxlt, 14 hours ago, In English

UPD: Who downvoted the blog, do you really think that having a problem that literally detracts from its solution is better than having a normal B? Please read the blog before making your opinion.

The purpose of this blog is to explain why Problem B from yesterday’s Educational Round is a really terrible problem that should not have been in the contest. I will primarily respond to the arguments presented by BledDest.

Thought process of a problem:

The problem does not directly hint that selecting the $$$k+1$$$ greatest elements is the correct approach. Finding this observation requires skill, as the problem is framed in terms of colors and unusual operations. Because of this, the version of the problem where $$$k \geq 2$$$ (i.e., selecting $$$k+1$$$ greatest elements) is actually a great fit for the second position in the contest.

Taken from the blog:

When preparing the problem, we had an option to discard the case when this greedy solution does not work. However, I didn't like that version of the problem because it just becomes a 'guessforces' problem — people can just assume that you always choose (k+1) maximums, submit the solution without proving it, and get Accepted. I believe we already have too many problems of this style on Codeforces.

I am not saying that "guessforces" problems are good, but a problem without proper sample cases is much worse, especially in problems A and B. Here’s why:

Why problem B exists and why this B fails to satisfy this purpose:

The purpose of Problem B is to create competition among participants who solve Problem A but struggle with higher-positioned problems.

However, when Problem B is harder than Problems C and D (if we ignore algorithmic complexity of course), it disrupts the balance of the contest. If a problem in this position makes higher-rated participants waste excessive time, then something is fundamentally wrong with its quality.

This was exactly the case in this round. Problem B required a more difficult observation than Problems C and D, and everything about its design pushed participants away from the actual solution:

1. Constraints $$$(n \le 5000)$$$ created misleading expectations

This usually hints at fixing an element (left, middle, or right), or at constructing a greedy algorithm in $$$O(n)$$$ or $$$O(n$$$ $$$log$$$ $$$n)$$$. The problem setter claims this was meant to allow solutions that select the $$$k + 1$$$ largest elements in $$$O(n^2)$$$, but this does not justify the constraints: anyone capable of solving the problem would obviously know how to sort.

2. Immediate WA on the second case for the sum of $$$k + 1$$$ greatest elements

If a problem is designed to punish an incorrect approach, it should do so in a way that gives room for thought rather than immediately shutting down a reasonable attempt. A better alternative would have been failing on the 3rd or 4th test case, which would serve as a subtle hint rather than an instant rejection. A well-balanced problem does not need to mislead participants so aggressively.

3. Problem B was harder than C and D

This forced many participants, including myself, to waste unnecessary time on a problem that should have been only slightly harder than Problem A, not significantly harder than Problem C. Codeforces is not meant to be an IOI-style contest where time management is a key factor; rather, it should allow participants to demonstrate their full potential.

This is not the first time this has happened. I've noticed a recurring trend in Educational Rounds where Problem B often requires more out-of-the-box thinking than Problems C, or even D, for example EDU174B, or EDU173B. Also, it's funny how organizers discourage guessing problems, but they created EDU170B, where you literally just need to output $$$2^k$$$ independent of $$$n$$$, "totally not guessforces". If this continues, the optimal strategy may simply become skipping Problem B altogether and moving on to the later problems.

Problems like this should not appear in contests. They create unnecessary confusion, mislead even high-rated participants (many experts likely solved only Problem A due to getting stuck on B), and fail to be educational. Specifically, there is nothing valuable in having a problem that boils down to selecting $$$k + 1$$$ largest elements while requiring an observation that takes too long to realize without normal samples.

Disclaimer: This blog isn't created in a way to hurt or offend anyone, just talking about a problem.

Tags sp
  • Vote: I like it
  • -93
  • Vote: I do not like it

»
8 hours ago, # |
Rev. 3   Vote: I like it +6 Vote: I do not like it

1. Constraints (n≤5000) created misleading expectations
Your expectations are wrong. If $$$n \leq 5000$$$, then you can expect that the problem is solvable in $$$O(n^2)$$$ or faster. If you missed $$$o(n^2)$$$ solution and focused only on $$$O(n^2)$$$ — that's your skill issue, bro.

2. Immediate WA on the second case for the sum of k+1 greatest elements
Say thanks to the authors that $$$k=1$$$ case was in tests. It would be so funny for others to hack your solution right after the contest.

A better alternative would have been failing on the 3rd or 4th test case, which would serve as a subtle hint rather than an instant rejection. A well-balanced problem does not need to mislead participants so aggressively.
Again the same mistake: wrong expectations.

3. Problem B was harder than C and D
Wrong, look at the number of solvers of each problem.

  • »
    »
    7 hours ago, # ^ |
    Rev. 2   Vote: I like it +7 Vote: I do not like it
    1. The problem stands at a position of B, I want to remind you. Those confusing tricks aren't something fitting to the difficulty of B.

    2. I express my uttermost gratitude for giving n = 3 and k = 1, it really helped to figure out the corner case (no). Also, when did I say that (k = 1) should not be in pretests? Again the same argument: the problem stands at a position of B.

    3. Well, that is because of the algorithms. If a person has some minimum algorithmic background, then they would be able to solve C, D. But that does not necessarily mean that the person can solve B. The number of solvers != the core difficulty of a problem.

»
8 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

Learn to prove your solutions

  • »
    »
    7 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Seriously?

    • »
      »
      »
      7 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Hueriously!

      • »
        »
        »
        »
        7 hours ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        This isn't even an argument, where did I say that I support guessing problems to be in CF?

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

          Yeah that's not what I mean. I mean that if you would have proved your guess of taking the biggest k+1 elements, you would have immediately noticed the k=1 corner case. And with a little bit of proof B is not harder than C nor D.

          Like the autor said, I think this problem is great to prevent proofless guesses and is educational in the sense that it teaches you to prove your hypothesis.

          Overall this blogs feels more like a rant about the problem because it caused you to lose so much rating, and trying to find excuses to justify your hate to this problem, rather than objectively considering if problems of this kind are good for CF or not.

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

            Yeah that's not what I mean. I mean that if you would have proved your guess of taking the biggest k+1 elements, you would have immediately noticed the k=1 corner case. — too person-specific, not an argument.

            Like the author said, I think this problem is great to prevent proofless guesses and is educational in the sense that it teaches you to prove your hypothesis. — it is great only for impediment of higher-rated coders from actually showing their skills.

            Overall this blogs feels more like a rant about the problem because it caused you to lose so much rating, and trying to find excuses to justify your hate to this problem, rather than objectively considering if problems of this kind are good for CF or not. — it is a criticism of a problem, don't have an idea what do you mean by "rant". I don't try to find excuses, but actually gave arguments against a problem. If it were just an excuse blog, then I doubt that it would be that long.

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

          Your arguments are supporting guessing problems pretty much

          Constraints should help you to guess the time complexity
          Failing testcase number should help you to guess the correctness of your solution

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

            "Constraints should help you to guess the time complexity", that is something generic that just gives you hint about the time complexity, and putting the constraints in such a way that the optimal solution passes is more logical. Hint about the time complexity != guessing the solution.

            "Failing testcase number should help you to guess the correctness of your solution", you still need to do some analysis in order to have a correct solution, but flat out WA2, especially on a problem B, is too strict.

            Having those two things barely help you to find the solution, but not having those things detracts from the solution really much (and unnecessary for B slot).

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

The largest Blog by Ali:>