geranazavr555's blog

By geranazavr555, 4 months ago, translation, In English

Hello, Codeforces.

In this post, I'll share with you a few recent improvements in Polygon made by MikeMirzayanov, unreal.eugene, DK318 and me.

Polygon is a service to prepares programming problems and contests. It is usually used to prepare problems for olympiads/programming contests but it is also often used to prepare educational content. It is located at https://polygon.codeforces.com/ and is open to everybody.

Here are three recent new features:

  • IOI-like Graders for Python
  • Problem Materials
  • User Groups

IOI-like Graders for Python

About 3 years ago we announced support of IOI graders for C++ in Polygon (Please read the old post). Now we have added support for graders written in Python. However, since there is no concept of linkage in Python, Python graders are different from C++ ones.

In the case of Python, the grader entry point file must have the name "main.py", placed into the “Resource Files” section and marked as a compile-time resource. This file will be invoked instead of the participant's solution while testing. Participant’s solution will be available as a Python module "solution" from main.py.

Also, you can add any other modules that will be available from the participant's solution. To do that, upload it to resource files and mark it as a compile-time resource.

All Polygon users already have access to the example problem "a-plus-b-graders".

Problem Materials

Now Polygon has a feature to specify which problem materials should be separately published as a downloadable zip-archive by a judging system (a judging system needs to support it). Codeforces already supports this feature: problem materials appear in the sidebar inside the contest:

To create a publishable archive with problem materials, you need to click "Add Material" on the "Packages" tab. You will see the following:

The material archive is automatically generated and stored in the problem package based on what you choose to publish (by clicking the “Add item” link). In the pop-up window, you can choose which elements the archive should contain.

There are three options for publishing: NONE, which means not to publish at all, just put it to the problem package, WITH_TUTORIAL, which means to publish at the end of the competition, and WITH_STATEMENT, which means to publish at the start of the competition.

User Groups

User groups make it possible to manage access rights to problems and contests for multiple users, as if for a single user. For example, if there is a well-established group of problem authors, you can not list all users when granting access, but simply specify the name of the group. Users in a group will have access to the problem automatically.

Here, @codeforces-team is a user group:

You can see your user groups by clicking the link in the top menu:

To manage user group members you have to click the “Enter” link on the corresponding group. You will see the list of all group members.

Note, that there are two roles: Member and Manager. Managers are allowed to edit the list of group members and Members are not.

To refer to the group on managing access pages (both in problems and contests) you should use @<user-group-name>.

Example of a user group in contests interface:

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

»
4 months ago, # |
  Vote: I like it +102 Vote: I do not like it

Thank you for the updates.

Is it possible to add a feature where we can directly specify the count of "prefix tests" to use as pretests, instead of having to create a "pretests" test-set, copy the tests and having to sync it if we make any changes to the main tests? (Maybe as an additional option to the existing version, so people can use the current one if required too)

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +88 Vote: I do not like it

    Yes, it's possible, we will consider it. Maybe it's truly useful.

»
4 months ago, # |
  Vote: I like it +49 Vote: I do not like it

Will we get C++20 support soon?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it +67 Vote: I do not like it

    The point is that we have to provide support for any language that was once added to the Polygon, because we have to guarantee that any problem made in the Polygon will be runnable everlasting. So we rearely add new languages and we do in only after a long-time testing it in Codeforces. But, maybe it's time to add C++20 in Polygon, we will discuss it.

»
4 months ago, # |
  Vote: I like it +15 Vote: I do not like it

Do ioi-like graders work on the codeforces?

»
6 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

+1