DMOPC '20 May Contest

Welcome to the sixth DMOJ Monthly Open Programming Competition of the 2020-2021 season!

The problem writers this time are Eliden, Kirito, ADMathNoob, 4fecta and Riolku.

Thanks to AQT, d, wleung_bvg, maxcruickshanks, samliu12, ThingExplainer, Zeyu and WilliamWu277 for testing and feedback on problems.

This round will be rated for all participants.

Before the contest date, you may wish to check out the tips and help pages.

This contest will consist of 6 problems, the difficulty of which may range anywhere from CCC Junior to CCO level.

You will have 3 hours to complete the contest. After the contest window begins, you may begin at any time. Once you enter the contest, your personal timer will start counting down and you will be able to submit until 3 hours from when you started, or until the hard deadline (00:00:00 EDT of May 31st), whichever comes first.

After joining the contest, you proceed to the Problems tab to begin. You can also go to Users if you wish to see the rankings.

Here are the parameters of the contest:

  • Some problems offer partial marks in the form of subtasks.
  • Ties will be broken by the sum of last submission times that increased score.
  • Scoreboard will be hidden, until your window is over. Divulging the contents of the scoreboard to participants who have not finished their window is an offense, the punishments of which are listed below.
  • Problems will be approximately increasing in difficulty. Reading all of the statements is recommended.
  • Checkers: unless otherwise specified, identical. The contest will follow the standard convention of having all lines terminate in a \n character, with no trailing whitespace.
  • Rated for opening the contest. Being able to read the problems will cause the contest to be rated.
  • It is guaranteed that all the problems will be solvable with Java and C++.

We have listed below some advice as well as contest strategies:

  • Remove all extra debugging code and/or input prompts from your code before submitting. The judge is very strict — most of the time, it requires your output to match exactly.
  • Do not pause program execution at the end. The judging process is automated. You should use stdin / stdout to perform input / output, respectively.
  • Python users are recommended to use PyPy 2/3 over Python 2/3 when submitting.

Clarification requests for the contest must be routed through the clarification system provided on DMOJ, and not through other channels including but not limited to Discord and Slack. Furthermore, all clarification requests will be handled the way they normally are in IOI. Note that, in particular, clarification requests must come in the form of yes/no questions.

Due to rampant issues with cheating on contests that has happened recently, any suspicious behavior during the contest window may result in your rating being impacted negatively. Such behavior includes, but is not limited to:

  • Divulging the contents of the scoreboard to participants who have not finished their window.
  • Registering for the contest with at least two accounts.
  • Participating in the contest with an account that is not your primary account.
  • During the contest window, talking about the contest in more detail than answering a yes/no question about whether one participated in the contest. This includes, but is not limited to, posting spoilers about the contest and public speculation of the contest.
  • Attempting to exploit bugs in the platform to subvert the constraints of the contest.

Punishments may include performance being unrated or, for more serious infractions, being forcibly ranked at the bottom of the scoreboard.

At the end of the contest, you may comment below to appeal a judging verdict. In the case of appeals, the decision(s) of DMOJ staff is final.


  • -2
    qiao_yun20060930  commented on May 31, 2021, 6:16 p.m.

    I dont get the rating system, it gives werid things

    • 21
      xiaowuc1  commented on June 1, 2021, 12:11 a.m.

      Here's an overly simplified TL;DR that is not entirely correct but should capture enough of the nuances of how ratings work.

      Your rating is simply an estimate of your skill level. It is not exactly equal to the performance in your most recent rated contest, but rather some weighted average of all of your rated contests, with more recent contests having more weight than less recent ones. Because it is a weighted average, it is possible for someone who did worse than you in the most recent contest to still have a higher rating than you because they demonstrated more consistent skill in previous contests. Symmetrically, if it possible for people who did better than you to have lower rating than you. This is so that lucky/unlucky performances do not cause ratings to become too volatile.

      If your rating goes up from a contest, then you did better than an average person with your rating at the time would have been expected to do. Symmetrically, if your rating goes down from a contest, then you did worse than an average person with your rating at the time would have been expected to do. Therefore, the direction and magnitude of the rating change is more helpful than the specific number you ended up.

      If you are improving, then your rating will generally be an underestimate of your skill level, so keep doing rated contests to see where your skill level ranks relative to other DMOJ users. Your rating will be very volatile when you start out, since everyone is seeded at a 1200 rating, but should stabilize after doing a few contests. Focusing on the specific number for you right now is not the best idea because it is impossible to assert that your rating has converged from doing just three contests - after you've done a few contests and your rating doesn't change very much from contests, then the number you've converged to is a more accurate assessment of your skill level. If your rating is still going up, then that means you're improving and your rating is simply catching up.

    • 4
      Lost  commented on May 31, 2021, 9:31 p.m.

    • 0
      Victor_Chan  commented on May 31, 2021, 7:47 p.m.


  • 15
    WilliamWu277  commented on May 28, 2021, 10:30 p.m.

    Have fun! r

  • 5
    vishnus  commented on May 25, 2021, 11:48 a.m.

    yay samliu12! (unfortunately you cannot become red on this contest) :(

  • 19
    ryanguorocket  commented on May 24, 2021, 11:47 p.m.

    gluck to u all