Hello, Codeforces!
I, ChurakovaAlexandra, and medvezhonokok are students of ITMO, and since this August, we started our internship at Codeforces. We are delighted that now we have the opportunity not only to write academic code but to do something that competitive programming enthusiasts from all over the world use.
Currently, we are working on minor improvements to Polygon — a system for preparing problems. Later, as we gain more experience and delve into the technologies, we will also start working on Codeforces.
A big thank you to our mentors geranazavr555 and MikeMirzayanov, who are always there to help and support.
Here's a list of the main improvements to Polygon that we've made (sometimes with significant help from our mentors) over these two months.
1. Automatic translation of solutions from one programming language to another.
On the 'Solutions' page, a 'Translate' button has been added next to each of the solutions.
When you click on it, you can choose a programming language and translate your solution into that language. Clicking the 'Get Translation' button opens an editor with the ability to edit and save the translated solution.
2. Multiple compiler change
Added the ability to change the language for all source files in bulk. This can be done in the 'sources' table on the 'Files' page, as well as in the 'solutions' table on the 'Solution Files' page (by selecting sources you need and clicking the 'Lang' button in 'Actions').
You can also change the language for this kind of files right on the 'Editor' page.
3. Preview for one or several tests
If you want to create a preview for a few tests, you can go to the 'Tests' page, select the tests you need for this purpose, and click the 'Preview' button.
4. New features on the Search page
If you need to find problem by its URL, Сopy it, go to the 'Search' page, and find the desired problem if you have the necessary permissions.
Also, when searching for problems or contests, you can sort the results by relevance or modification time
5. Contest's problems editing.
We supported the option to change TL/ML and problem name in the problem statements in different languages for all available problems in the contest. To use this, click 'Change names and TLs/MLs' link in sidebar on Contest Problems page.
6. Testset and Group in Stress
Added the capability to include testset and group when editing a stress. If a test is found for a stress and testset and group are specified, clicking 'add to test' link will set testset and group automatically without the need to specify them through a pop-up.
7. Solution tags autoset after invocation
After invocation is completed, you can click on 'Set solutions tags' link to automatically assign solution tags based on the invocation results.
8. Contest problem switcher update
In the problem switcher for the contest, highlighting has been added to tasks that have uncommitted changes and/or open bug issues.
9. Mass operations with Checker tests.
Support for mass editing, adding, and the ability to make changes during mass copying has been added for Checker tests. You can also save the result by using 'Ctrl+Enter'.
10. Problem statement save button in Edit-And-Preview mode
Now it is possible to save your changes in problem's statement using preview mode.
11. User settings update
In user settings, an option has been added to disable email notifications for task commits.
12. Improved issue handling
Now you can close and reopen issues with one click.
13. Multiple deletion/addition of dependencies to test groups.
Supported opportunity to add or remove dependence for multiple test groups.
14. Material editing improvements
Now, when creating a package and editing materials, there is an option for 'Test answers' to select only those tests that you have chosen as inputs.
Polygon API improvements:
- problem.commitChanges — commits problem changes.
- problem.validatorTests — returns a list of validator tests for the problem.
- problem.saveValidatorTest — add or edit validator test.
- problem.checkerTest — returns a list of checker tests for the problem.
- problem.saveCheckerTest — adds or edits checker test.
- problem.buildPackage — starts to build a new Package.
You can find the full description of Polygon API here.
Other updates
- Now you can see invocation progress when it's running.
- When editing materials, the option to select all tests has been added to highlight all tests.
- Added the display of the number of example tests in the 'Example' column on Tests page.
- Red highlighting has been added to issues count assigned to the user if at least one of them is open and not outdated.
- On the Contest page, the user does not see the 'Start/Continue' links for a task if they do not have permissions for it.
- Added new warning for situation when there is a solution that has the same name as a file on the 'Files' page.
- Added warnings for built packages.
- Now you can see TL/ML of the problem in column 'Info' in any table with problems.
- In all forms, autofocus has been added, either on input or on errors, if they exist.
- Added autofocus on 'Time Limit' field on 'General Info' page and on 'Testset name' field while creating new testset.
- If you have only read access for the problem, in all problem lists it will be displayed with a star icon next to the its name and will have title with the text "read access only".
- The 'Main correct solution' tag no longer gets removed when adding a valid solution via the API.
- An 'Edit' link has been added while viewing the file.
- Updated generator examples on the Files page.
Thanks a lot for your work!
Warnings for built packages is such a great feature! It was definitely too easy to miss some variable not reaching the maximum value before.
Autofocus on input is nice, but I think it's misplaced on the validator and checker "add test" pages. Surely it should be on the test input instead of the test number.
Can't say I care too much about the rest of the updates, but it's cool to see Polygon getting so many new features.
How does language translation work?
This feature internally uses ChatGPT
It would be great if there are improvements on UI / UX. I'm looking forward to see new features on Polygon and Codeforces. Really appreciate it!
14 features in 2 months? You folks are absolute beasts (in a good way)!
It would be really helpful if you guys make a feature to download the testcases after the end of contest. Most of the time large set of testcases are not visible and we can't figure out our bug in code while practicing.
You may need this.
it costs money, doesn't it?
Lots of really nice and useful improvements here, good job!
Thanks a lot for these updates.
I would like to mention an issue I faced some months ago.
I made an interactive problem (a very simple game theory, #$$$259562$$$ and the Polygon link).
In the interactor, there is a statement:
This statement initially was:
This was giving an error, so I changed it. Either I was not using the input streams correctly, or the interactor is having some issue reading from
ans
stream.It is one of the nicest update on cf. Really in love with this platform..
Wen Polygon no longer beta? /j
Ton great features added btw. Thanks for all the great work!
Also, when will the round corner of the panels on Polygon be implemented in CSS instead of pixel art?
Previously CF also had similar things with the panel corner. I noticed that it is implemented with CSS now. So if you guys implement that, thank you!
I suggest you write an issue in the bug tracker. Actually, it's now better to migrate to CSS border-radius. I'm quite proud that my implementation of round corners from 2008 worked in browsers from IE6 up to modern ones without any fixes :) But for sure it's time to replace it with css.
Thanks! Great work!
Good job!
Do you have plans to make polygon work offline? Or at least a version that we can host ourselves?
This doesn't seem interesting for the CF, but I feel like we could be using the polygon machinery for other onsite contests as well, and, later, easily set those contests as GYMs, for other CF users. The community would benefit a lot with a unified (and reliable) tool for problem setting, with better and well prepared problems. In some sense, this could increase the variability of topics and increase our pool of problems. We could at least mitigate the friction of migrating between problem setting tools, such as box and polygon.
Thanks for sharing your updates! And congrats, the internship sounds super cool!!!
Add a new endpoint that takes "groupId" and "groupContestId," and optionally "listKey." This endpoint should return the solved problems for every user in that list, or for every user if "listKey" is not provided in the request. For public groups, you don't have to be a manager to access the data; however, authentication may be required.
We have already implemented this using an alternative method to mentor our trainees, but it would be better to have an official way to do so.
Add OAuth2 into your API to enable users to "Log in using Codeforces."
And thank you for what you did in polygone.
Thank you very much. I also wish for a useful feature that would allow us to download problems in a way that enables offline work.
Is c++20 available in Polygon now?
It works in the invocations. But when I tried to build the package, it failed and showed:
PackageException: Can't create or save package files: 'cpp.gcc11-64-winlibs-g++20' is not a known file type.
Thanks for your great work! These are really cool updates.
Does someone know if there is a way to give points only if the solution passed like 50% of testcases?
This updates are really nice! Good work!