fcspartakm's blog

By fcspartakm, 7 years ago, translation, In English

Hello, Codeforces!

It is time to tell about the improvements in Polygon. It 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.

Common

A special fields with examples now displayed on a page with a list of files which used in problem and on checker, interactor and validator pages. It will be very useful for the new users and will help them faster understand the system.


Some new mail notifications on change in problems ans contests have been added. Now letters are sent when you add, change or remove access to problem/contest. Besides that the option of add a special emails has been added. Letters are sent on a special mails on any changes in problem or contest. You can add the special emails for the contest on Properties/Files page (manual how to do that is under the table Contest resources/files) and for the problem on Advanced Setup page.

The field Change Log has been added to each problem commit. This field can be found on Recent Changes page. Change Log contains information about all changes for the relevant commit (likewise with letters that are sent to users).

Also the correct transition to the previous viewed page is realized.

Contests and Problems

The column Modification Time has been added to the contests page, which are available to the user. This column contains information about the last time when contest or any problem in contest has been changed.

Now if you added contest property you can use it in statements.ftl as contest property. The name of added property must begin from the letter and must contains only letters, digits and underlines. For example, you can add property note and use it in statements.ftl like ${contest.note}.

Partially problems with equal problem names in a single contest have been solved. If a contest contains problems with equal names you will get a warning on the page with a list of problems which used in the contest.

On the General Info page the field Contests appeared. This field contains a list of all contests which available to the user and contain this problem.

The option of adding notes has been implemented for the problems. For example, you can use it to short description of a problem difficulty.

The column Warnings has been added to the page with a list of problems which used in the contest. You can see all warnings for the problem here (similarly with issued). The list of warnings updates after commit for this problem.

Also the logic of deleting and restoring problems and option of grant access to the several users simultaneously have been improved.

Problem Search

The option of searching all problems which was created by user has been added. For that you need to search problems by login of this user (i. e. by the owner login). On the search results page now always show the short description of the problem in it does not empty. Also now you can search the problems with zero revision.

Statements

In the case of errors while building statements for the whole contest now display the name of the problem with error. It will help to faster find the error and fix it.

Also the warnings about incorrect endings (accruals) of numerals have been added for the Russian statements. Here you can find the correct rules http://new.gramota.ru/spravka/letters/87-rubric-99 (on Russian).

Validators

For the validator tests the option of adding testset and group has been implemented. It simplifies the testing of validators for the problem in which several testsets and groups are using. You can add or change the names of testset and group directly on the page of add/edit test.

Earlier it was impossible to run validator test if the problem does not has a checker. Now it is fixed. Also for the validators the following warnings have been added: if validator use old format registerValidation() or if validator has unnamed variables.

Tests

Now you can add/change the group name for the test directly on the page of add/edit test. Also the special logic has been implemented to tip anticipated group name and autocomplete. Errors on edit and copy tests have been fixed. The displaying of errors on preview tests has been improved. Also now you can choose the range of tests with help of the shift button.

Stresses

The choosing of solutions for the stress has been improved. Now there are checkboxes to choose needed (similary with tests). Also the option of сopying stress has been implemented. All copies will have equal list of the solutions. When you change solution list in a single stress it will be automatically change for the all stress-copies. Other parameters can be changed independently of other stress-copies.

Also the correct stress-testing for the interactive problems has been improved.

Solutions

Now you can download and delete the several number of solutions simultaneously on the Solutions page. Also the option of simultaneous editing solutions on a single page has been implemented. You can save solutions either one by one or all at once.

Packages

The logic of creating packages has been improved. For example, earlier you was not be able to create a problem package with verification if before that was created a problem package without verification but for the same revision. Now it is fixed.

Testlib

The useful changes were introduced also in Testlib library, which supported in Polygon. You can download the new Testlib release by the link testlib-0.9.12. Now in validator you can read in one line the sequences of elements which separated by spaces. The elements can be either numbers (integers or real), and strings. To read numbers you need to use the functions readInts(), readIntegers(), readLongs(), readUnsignedLongs(), readDoubles(), readReals(), readStrictDoubles() and readStrictReals(). To read strings you need to use the functions readWords(), readTokens(), readStrings() and readLines(). The result of this functions is always a vector. For example, to read 100 integers in the range from  - 1000 to 1000, inclusive, you need to write inf.readInts(100, -1000, 1000, "a").

Here are some more examples:

vector<string> names = inf.readLines(n, "[a-z]{1,10}", "names");

vector<long long> ids = inf.readLongs(2 * n, 1LL, (long long)(1E18), "ids");
inf.readEoln();

vector<int> p = inf.readInts(n, 1, n, "p");
ensuref(set<int>(p.begin(), p.end()).size() == n, "p should be a permutation of 1..n");
inf.readEoln();

Polygon-cli

Multiple improvements implemented in API Polygon. Now it is even more convenient to use the console client. You can learn more about it here.

Soon you will get new and new improvements! Thank you all for the attention!

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

»
7 years ago, # |
Rev. 7   Vote: I like it +17 Vote: I do not like it

Awesome!

Are examples at the bottom correct? Shouldn't we use vector<long long> here: vector<string> ids = inf.readLongs? And the last ensure seems to have different number of opening and ending brackets.

EDIT: and btw. how to enable groups of tests in Polygon? And is it possible to choose a group in the script (something like gen 123453 > test_number (group_number))?

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks, examples are fixed.

    No, it is impossible for now.

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +16 Vote: I do not like it

      No, it is impossible for now.

      And that is a great pity. There is a long-standing ticket (in Russian) for such a functionality (duplicated by Burunduk1 several days ago), and it sounds like a very convenient feature that doesn't seem hard at all. Like, if we generate almost all tests, why should we manually mark them with group ids?

      • »
        »
        »
        »
        7 years ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        More than a year is "several days" for you. I wish I could live this way.

        • »
          »
          »
          »
          »
          7 years ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Oh, I thought second issue was filed after last all-Russian Olympiad that has just finished. My bad.

»
7 years ago, # |
  Vote: I like it +3 Vote: I do not like it

ensure(set<int>(inf.readInts(n, 1, n, "p").size() == n, "p should be a permutation of 1..n");

should be

ensure(set<int>(inf.readInts(n, 1, n, "p")).size() == n, "p should be a permutation of 1..n");

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Why I can't add a problem to a Mashup, when i try to add problem it give the error "Can't find problem descriptor" and i try with an old problems, and I can't open any problem in an old Mashup it give the error "can't read or parse problem desriptor" ?

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Did you add access to "codeforces" user?

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      yes

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Last week I create a mashup and add problem to it today I can't access to the problem, and I try to add the same problem to the mashup but faild

»
7 years ago, # |
  Vote: I like it +5 Vote: I do not like it

I'm sorry if

  • this is already asked or
  • if my question seems stupid for some of the experienced problemsetters or
  • if this is offtopic, but

is there a guideline for how to create a complete problem in Polygon?

For example, let's say I have an idea for this dummy problem:

"Read two integers and print their xor value"

Then, having this, what does the corresponding problem Checker and/or the Validator stand for? And how should the testset for the problem be implemented — by a generator, manually, or...?

Of course, there are many more questions that could be asked, but in general I would like to get comfortable in working with Polygon and its features.

Is there already a such resource, which I should get familiar with?

Thanks

»
7 years ago, # |
  Vote: I like it +10 Vote: I do not like it

When I add mashup contest in Gym, I see that there is option IOI for contest format. Is this feature working? I cannot get scoreboard to work, and it looks like few people in this blog also can not.

What I did:

  • Create problem in Polygon, set judge to return partial scoring.
  • Create new Mashup contest.
  • Add my problem to the Gym Mashup.
  • Submit code. It is judged correctly as "Partial result: 100 points".
  • Open scoreboard. Now I see: "Ooops! Something has broken down in Codeforces. Do not panic, you can try to reload the page or return Home. Anyway we will carefully read megabytes of logs, analyze stacktraces and fix the problem".