Lyndon's Golf Contest 1

Welcome to DMOJ's first-ever code golf contest!

Each problem in this contest will test your ability to solve the task with the shortest possible source code. Please read the Scoring section for more detailed information.

All problems are created by Dingledooper.

Thanks to Josh, HyperNeutrino, dnialh_, and billsboard for testing and feedback on the problems!

Special thanks to Riolku for helping us organize the contest!

Contest Parameters

  • This contest will run for 4 days, starting on November 18, 2022 12AM EST. You will have the full contest duration to participate in the contest.
  • This contest will consist of 9 code golf style problems. They are not necessarily in increasing order of difficulty.
  • Due to the nature of this contest, each problem can only be submitted to in a single language, one of C/C++, Python, Ruby, or Perl.
  • Each problem will offer partial marks that are awarded to correct solutions with a sub-optimal byte count.
  • Checkers: unless otherwise specified, identical. All output must terminate with a single \n character, and must not contain any leading or trailing whitespace.
    • Please note that all input files also terminate with \n before EOF.
  • There is no submission limit.
  • The scoreboard will be visible throughout the contest.
  • This contest is unrated.


For all problems in this contest, you will be scored on the number of bytes in your program's source code. Each problem will specify a formula that determines the amount of points you will earn for a given byte count. A lower byte count is guaranteed to result in a higher score, for a maximum of 100 points per problem. Whitespace is included in the byte count, which includes \n characters. On Windows machines, newlines usually take the form of \r\n, but they will be automatically converted to \n before calculating your score.


  • All problems reward partial marks, therefore it is recommended to read through and attempt every problem.
  • The aim of code golf is to write the shortest code, not the shortest clean code. Don't be afraid to obfuscate code, exploit problem constraints, and look for test case flaws (if you can find one!).
    • Submissions that pass by random chance, however, are not allowed, and such a submission may be rejudged before final scores are calculated.
  • It is not only allowed, but encouraged to use the internet for any resources that may help you during the contest. For example, CGSE offers a tips page for general Python golfing.


  • 0
    greencis  commented on Nov. 22, 2022, 9:36 a.m. edited
    1. Will upsolving be opened?
    2. Can we retrieve our submissions from the contest?
    3. Will the authors' solutions or some kind of editorial be available?

    • 2
      WilliamWu277  commented on Nov. 22, 2022, 11:07 a.m.

      From what I've heard there are editorials that will be available when the problems are published. As for upsolving and retrieving submissions, currently you can click on the "Virtual Join" button to do those.

  • 2
    zleo0824  commented on Nov. 22, 2022, 4:49 a.m.

    any editorial?

    • -25
      volcano  commented on Nov. 22, 2022, 3:47 p.m. edited

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