Hello, Codeforces!
Previously, my contribution to the development of Codeforces was limited only by rounds preparation (Codeforces Round 288 (Div. 2), Codeforces Round 293 (Div. 2), Codeforces Round 297 (Div. 2)). But a month ago, I joined the wonderful Codeforces team led by Mike Mirzayanov (MikeMirzayanov). Traditionally, to understand all the niceties of this project, my work begun from Polygon system. I would like to tell you about its changes.
Polygon is a system for the preparation of programming problems. All Codeforces rounds and many other olympiads prepared in Polygon. Everyone at any time can use this system.
To edit the files in Polygon now used Ace Editor. It has a nice looking syntax highlighting and autocompletion (you have to press Ctrl + Space). Soon planned to implement this editor in Codeforces.
Unfortunately, Ace Editor not support scrolling text on the smartphones and the tablets. Because of that the old text editor was left on them.
Button View Source has appeared on the validator, checker and interactor pages. When you press this button you can see the source code file. It is convenient because now you can see the source code of standart checkers.
Also useful changes have been made in Testlib library, which also work in Polygon. Now you can specify in validator different restrictions for different testsets and for different test groups. To register validator you need to use registerValidation(argc, argv);
, and methods validator.group()
and validator.testset()
appeared in validator.
To check test by validator from command line using testset and group you need to write command val.exe --testset "testsetName" --group "groupName" < testFile
.
This changes useful, for example, for preparing school problems where allocated different test groups. Also this changes will allow to use in Codeforces round multitestsets, prohibiting use such tests in hacking attempts.
It becomes easier to check cover of different cases by tests. It is supporting in Polygon in tab Invocation.
If in validator you indicated variable name (this function ignores variable which contains digits in their names), then if you have no tests, in which this variable reaches minimal or maximal values, after perform Invocation, you wil get warning about it.
Besides it in testlib/Polygon appeared additional functionality, which we called features. Often (usually it helpful for coordinator of preparing problems) required to check that tests cover different cases (patterns). For example in graph problem, probably, you have to be sure that you have tests with disconnected graphs and big trees. To guaranteed it now is enough to add in validator to the begining declaration of two feature support — addFeature("disconnected");
and addFeature("big-tree");
. In the main part of validator after read graph you can check him on connectivity and if the graph is disconnected you may fix it by calling feature("disconnected");
. Similary with tree: if graph is a big tree you may fix it by calling feature("big-tree");
.
When you startup invocation Polygon will alert you, if there is the declared feature, which did not met in tests. In out examples it will say, that tests does not contains disconnected graph and big trees.
Introduction the Features will be useful for a person, who check ready problem or ready contest. But we think that also it will be very helpful for problem writers.
Validator output information about achieving extreme variable values and about features, if you add to call validator in command line parameter --testOverviewLogFileName log.txt
. Polygon reads and parses exactly this logs to show warnings for you.
Soon you will get new and new improvements! I wish to all good summer mood!
Minor feature request: add a button to create validator/checker file in the repository directly, probably using some template (either shared or personal). I edit these files in web interface directly, but I still need to create them locally in order to upload them initially which doesn't make much sense.