Skip to content
EvirirPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

42 Commits

Folders and files

Repository files navigation

Polygon converter

PyPI

Polygon refers to Codeforces' Polygon.

This package creates a copy of the tests, renames the tests and outputs a string that can be used for the Score Parameters field (use GroupMin score type) for Contest Management System (CMS). The renamed tests and the score parameters capture Polygon's subtasks (groups) and dependencies in CMS.

This code uses problem.xml in the Polygon full package (either Windows or Linux is fine) to retrieve information about subtasks.

How To Use

  • Install this package: pip install polyconv
  • Groups may use Polygon's COMPLETE_GROUP or EACH_TEST points policy.
  • Generate a full package on Polygon for your problem and download the Linux version.
  • Run polyconv polygon_path, where polygon_path is the path to the Polygon full package's root directory (where the folders statements/ and tests/ are). Add the -f flag to overwrite files if they exist.
  • A new folder cms_out will be created in polygon_path (this can be changed with -o) containing the following:
    • A folder tests/ containing renamed tests such as input.01_group.txt and output.01_group.txt.
    • A .zip file tests.zip with the contents in the tests/ folder above.
    • A score_params.txt file with the Batch score parameters string. You should copy this to the Score Parameters field in CMS (use GroupMin score type).
  • To also extract OutputOnly tests, pass --output-only SUBSTRING. Any test whose group name contains SUBSTRING remains in the Batch files and is additionally written to:
    • output_only.zip, using extensionless input.XX and output.XX names.
    • attachment.zip, using input-only input_XX.txt names.
    • output_only_score_params.txt, with one GroupMin subtask per output file using that test's Polygon points.
    • Matching tests are ordered by their original Polygon test number and renumbered from 00. IDs are padded to the selected test count's width, with a minimum of two digits.
  • To also create samples.zip, pass --samples GROUP. This uses exact group matching and renames the selected tests sequentially as input.01.txt, output.01.txt, and so on.
  • The Batch score parameters and, when requested, OutputOnly score parameters will also be output to standard output.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages