vitorfhc / competitive-problems-tools

Competitive problems formatter tools

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cp-tools

Competitive programming Tools Logo

About the projectInstallationFeaturesBasic usageTestsTechnologies


About

Format, test and pack competitive programming problems.

Installation

Clone this project and build with command make:

$ make

To install cp-tools, use the command below as a super user:

$ make install

The binary will be copied in /usr/local/bin. The support files will be copied in /usr/local/lib/cp-tools directory.

To uninstall run

$ make uninstall

Dependencies

  • pdflatex
  • GCC 9
  • Python 3
  • libssl-dev
  • clang-format (optional)

Features

  • Generates the problem PDF and checks the solutions
  • Integration with Polygon
  • Integration with MOJ
  • Support for interactive questions

Basic usage

To create a basic problem template use the following command on an empty directory:

$ cp-tools init

To remove auto-generated files (which are located in .cp-build folder in current directory), use the command

$ cp-tools clean

To generate the PDF version of the problem, use the command

$ cp-tools genpdf

The command

$ cp-tools check

verifies the validator (flag -v), the checker (flag -c) or the tests (flag -t).

To judge a solution, use the command

$ cp-tools judge solution[.c|.cpp|.java|.py]

To connect to Polygon API use the command

$ cp-tools polygon

For more information, use the option -h (or --help), as shown below:

$ cp-tools -h

Or read cp-tools man page using

$ man cp-tools

Tests

To run the unit test use the commands

$ make
$ ./cp-run_tests

Polygon connection tests

On a local run of the tests you need to set both environment variables: POLYGON_KEY and POLYGON_SECRET.

If you are using Travis on your own fork you must add the environment variables POLYGON_KEY and POLYGON_SECRET following the official tutorial.

Technologies

  • C++17
  • GCC v.10.2.0
  • LaTeX

About

Competitive problems formatter tools

License:GNU General Public License v3.0


Languages

Language:C++ 99.1%Language:TeX 0.4%Language:Makefile 0.2%Language:C 0.2%Language:Roff 0.1%Language:Shell 0.1%Language:Java 0.0%Language:Python 0.0%