Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Gassa's blog

By Gassa, history, 4 months ago, In English

Hi!

The next stage of Universal Cup, Run Twice Contest, will happen on December 30-31, 2023. As the name suggests, all problems in the contest are in run-twice format. I am the author of the contest.

Originally, the contest was held in Petrozavodsk Summer Camp 2022. The plan was to hold it later as an Opencup stage, in order to further introduce the format to a wider audience. Alas, Opencup got suspended around that time. Fortunately, sharing it beyond the camp can finally happen now. Thanks go to Qingyu and the other Universal Cup admins!  

About Universal Cup

The Universal Cup is a contest series for competitive programming teams. Among other qualities, it is a spiritual successor to Opencup. The stages are various camp stages, ICPC regionals, local contests and the like. This scheme gives participants fresh, diverse and quality contests to train and compete, at the same time allowing local contest authors to share their work with the world.

Proceed to the Universal Cup site to take part!

The contest duration is 5 hours. There are seven time windows for participation: the first one starts at 02:00 UTC on Saturday, and the last one starts at 18:00 UTC on Saturday. See the rules for details.

About Run-Twice

Run-twice is a custom problem format. A classical problem works as follows; programs are capitalized, data are lowercase:

input > Solution > output > Checker

  • The contestant's Solution reads an input and produces an output.
  • The output is checked by the jury's Checker program.

A run-twice problem, now, works as follows:

input-1 > Solution > output-1 > Channel > input-2 > Solution > output-2 > Checker

  • The contestant's Solution reads an input-1 and produces an output-1.
  • The jury's Channel program reads the output-1 and produces an input-2.
  • The contestant's Solution runs again, reads the input-2 and produces an output-2.
  • The output-2 is checked by the jury's Checker program.

Importantly, the second run of Solution does not see input-1.

A prominent example of such problem is IOI 2011 Parrots.

The natural use of the format is encoding-decoding problems. For example, the first run transforms 123 into one two three, and the second run sees one two three and restores 123. Or the first run sees a regular bracket sequence and prints its lexicographical number, and the second run sees the number and restores the sequence. Here, the jury's Channel program just checks the correctness of output-1, and maybe adds something to produce input-2, like the size of the string.

It turns out however that run-twice format allows for much more than that. In the contest, I'd like to demonstrate its various uses that I've learned so far.

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