Codeforces и Polygon могут быть недоступны в период с 6 декабря, 22:00 (МСК) по 7 декабря, 00:00 (МСК) в связи с проведением технических работ. ×

Блог пользователя -is-this-fft-

Автор -is-this-fft-, история, 4 года назад, По-английски

A week ago, I made this blog post. Earlier, I already wrote a small update to the blog, but I wanted to make a separate post to get more contribution properly announce what I did as well as to share my code.

Thanks to vjudge's suggestion, there is now a way to participate in CodeChef Cook-Off contests virtually on vjudge.

How to participate

  • Go to the list.
  • Open a contest by clicking on its name.
  • Click the "clone" button to create your own private copy of the contest.
  • Set the "begin time" to the time you'd like to start the contest, somewhere in the future.

Keep reading if you want to know how it works. $$$~$$$

How it works

The contests are so-called replays -- they are generated from the final ranklists (complete with "time of AC" and penalty for every problem and contestant) of the contests. The contest data is downloaded from CodeChef and exported to vjudge format (an Excel worksheet). This means that the ACs in the standings are correct at any point in time, but information about "who has attempted but not yet solved this problem" is lost.

Vjudge imposes a limitation on the number of participants in the scoreboard: 2000. This means that in some Div. 2 and Div. 3 contests, the ranklist is truncated to the top 2000 participants. I also thought about picking a random 2000-person subset from the list of participants, but this seemed better: it's more important to know which hard problems are starting to be solved than to know whether an easy problem has 4000 or 5000 solvers currently.

Since the Lunchtime ranklists don't contain data about "time of AC", it's unfortunately not possible to create virtual contests of them so easily. Thus, we are limited to Cook-Offs only.

My code

As mentioned above, the contests are created by downloading ranklists from CodeChef and exporting them to vjudge format. The code to do all that is in this GitHub repository. The project is a .NET Core console application; you should be able to run this on every platform. It supports both downloading the contest ranklist from the CodeChef site as well as importing the ranklist from a JSON file (more or less the representation used to generate the ranklist page on CodeChef). Similarly, you can export to both JSON and vjudge's format. In the repo is also a data folder, containing the JSON representations of all Cook-Off and Lunchtime ranklists to date.

I'm sharing my code with you on the grounds that you will use it responsibly. In particular, I really really don't want to bother CodeChef with unneccessary excessive requests. Therefore I ask you that if you want to use CodeChef ranklists for any project (statistics, alternative virtual contest platform etc.), please use the JSON ranklists provided in the data folder instead of re-downloading it from CodeChef.

On the progress of uploading

Once contests are exported to vjudge format, they need to be uploaded. This part is done manually.

I have currently uploaded all Cook-Offs since January 2018. It is unlikely that I will upload earlier contests before I participate in all of them.

However, if you want to help uploading them, that's great! To upload a contest, you should go to the contest page on vjudge, click "Create Contest" and choose Replay. When a contest is exported to vjudge format, an auxiliary info.txt file is created along with the Excel ranklist itself; this file will help you fill in the "new contest" form. There are a couple things to keep in mind:

  • As mentioned above, please use the data folder in the repo instead of redownloading the ranklists.
  • Vjudge expects the contest start time in your local timezone, so I use my local timezone (UTC +3) in info.txt. Keep this in mind to ensure that the contest start time remains correct.
  • Problems need to be entered in the correct order (specified in info.txt) — this is the only way vjudge can match the columns of the ranklist to problems.
  • I have seen some contests where the contest length or start time are questionable: use your common sense in this case. Mostly they are off by a couple of seconds, but there was also at least one contest where the length was falsely reported as "1 day and 18 hours".
  • Pay close attention to the penalty time. It's 1200 seconds for older contests and 600 for newer.
  • Respect the rules of vjudge; don't create messy replays or duplicates. Fill in the form in a dignified way, using proper capitalization in the title and so on.

Huge thanks for virtual judge for making this possible and to anyone who gave advice on the subject!

  • Проголосовать: нравится
  • +93
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Thank you for the impressive work!