DMOPC '19 October Contest

Welcome to the second DMOJ Monthly Open Programming Competition of the 2019-2020 season!

The problem writers this time are george_chen, KevinWan, little_prince.

This contest was audited by AvaLovelace and Kirito.

Please note that this contest will be full feedback.

This round will be rated for all participants who submit at least once.

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

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

This contest will feature a 7-th problem (Problem 0) for students who are just getting started with programming.

Some problems offer partial marks in the form of subtasks. If you cannot solve a problem fully, we encourage you to go for these partial marks.

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 (midnight EDT of Oct. 13th), 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.

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

  • Ties will be broken by the last submission time that increased your score plus penalties. The first submission time of your highest score will be used.
  • Each non-AC (excluding Compiler Errors) submission will incur a penalty of 5 minutes.
  • It is not guaranteed that the problems will be in order of increasing difficulty. Reading all of the statements is recommended.
  • 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.
  • It is guaranteed that all the problems will be solvable with C++.

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 Slack and Discord.

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:

  • 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.


  • 0
    dsv2075  commented on Nov. 8, 2019, 11:38 a.m.

    where I can find the solution? Editorial link is not working

  • 11
    Rimuru  commented on Oct. 21, 2019, 1:48 p.m.

    Due to a change of P4's data, I have publicized another version of it so that it does not affect the leaderboard here.

    • 3
      002  commented on Oct. 22, 2019, 12:23 a.m. edited

      Now my \mathcal{O}(Q T + N T \log Q) solution can't pass :(

    • 5
      Ninjaclasher  commented on Oct. 21, 2019, 3:09 p.m.

      decreases time limit instead of augmenting test data

      • 3
        wleung_bvg  commented on Oct. 21, 2019, 4:06 p.m.

        At least data was correct

        • 3
          magicalsoup  commented on Oct. 21, 2019, 5:16 p.m.

          Are you still mad about A Harder Contest?

    • -14
      wleung_bvg  commented on Oct. 21, 2019, 2:00 p.m. edited

      This comment is hidden due to too much negative feedback. Show it anyway.

  • 16
    imasheepow  commented on Oct. 20, 2019, 6:41 p.m.

    Are these problems going to be publicized?

    • 9
      Rimuru  commented on Oct. 21, 2019, 1:48 p.m.


  • 6
    stringray  commented on Oct. 15, 2019, 7:03 a.m.

    how to solve p5 connections

    • -14
      magicalsoup  commented on Oct. 15, 2019, 1:32 p.m.

      This comment is hidden due to too much negative feedback. Show it anyway.

  • 13
    Swarley  commented on Oct. 14, 2019, 5:51 p.m. edited

    weak P4 test data? slight optimizations allow \mathcal{O}(NTQ) solutions to pass.

  • 4
    verybadallen  commented on Oct. 14, 2019, 4:53 p.m.

    OPEN 12 HOUR HACKING PERIOD :blobhammer:

  • 1
    Saikat  commented on Oct. 14, 2019, 11:50 a.m.

    I'm new here. How do I submit solutions to these problems after the contest and check other people's solutions like in CodeForces ? I wish to upsolve them.

    • 14
      crackersamdjam  commented on Oct. 14, 2019, 12:30 p.m.

      You may click virtual join to start a virtual session that simulates the real contest. Unfortunately, you will not be able to view others’ solutions until the problems are released (outside of contest) AND after you solve the problem(s) in question.

      • 1
        Saikat  commented on Oct. 14, 2019, 4:58 p.m.

        Thank you for your reply. But I have already participated in the contest in real time. Will I be allowed to participate in Virtual Mode ?

        • 5
          alextxu  commented on Oct. 14, 2019, 5:15 p.m.