If you are using C++ to create an OI problem, Testlib is an excellent helper tool when writing related programs (generator, validator, checker, interactor). It has become indispensable for OI problem authors from Russia and some other countries, and many competitions are using it as well: ROI, ICPC regional competitions, all Codeforces rounds...
The Testlib library has only one file called
testlib.h, so you only need to add
#include "testlib.h" at the beginning of the program.
The specific usage of Testlib:
- Writing data generators.
- Writing validators to determine whether the generated data meets the requirements of the problem, such as data range, format, etc.
- Writing interactors for interactive questions.
- Writing checkers for the Special Judge.
Testlib is fully compatible with Polygon which is developed by Codeforces.
testlib.h was migrated from
testlib.pas in 2005 and has been updated ever since. Testlib is compatible with most compilers, such as VC++, GCC g++, and is compatible with C++11.
buildLast update and/or translate time of this article，Check the history
editFound smelly bugs? Translation outdated? Wanna contribute with us? Edit this Page on Github
peopleContributor of this article OI-wiki
translateTranslator of this article Visit the original article!
copyrightThe article is available under CC BY-SA 4.0 & SATA ; additional terms may apply.