Коротко о testlib.h

Правка en1, от Zlobober, 2015-06-08 20:43:25

Section about testlib is temporary, at some day it will be merged into global documentation section when it appears.

If you are developing a programming contest problem and you are doing it with using C++ then testlib.h is a right choice to write all axillary programs. This library is a standard solution in a professional community of problemsetters in Russia and several other countries. Many contests are prepared by using testlib.h: All-Russian school olympiads, ACM-ICPC regional contests, all Codeforces round and many others.

Recently testlib.h was moved onto GitHub, now it is available by the following link: https://github.com/MikeMirzayanov/testlib

testlib.h library is contained in a single header file. In order to include it you should just put testlib.h in the same directory with a program you are writing (checker, generator, validator or interactor) and just add a following line to the beginning of your program: #include "testlib.h".

Here are the cases when testlib.h is really useful:

  • In writing generators. These are the programs that create tests for your problem, since it is not always possible to type a whole content of the test by using the keyboard (at least because of their possible large size);
  • In writing validators. These are programs that read the whole test and verifies that it is correct and that it satisfies the constraints of the problem. Validators should be maximally strict with respect to spaces, endlines, leading zeroes etc;
  • In writing interactors. These are programs that are used in interactive problems, if your problem isn't interactive then just nevermind;
  • In writing checkers. If your problem allows several possible answers for the tests then you should write a special program that checks participant's answer against jury's answer and the input data.

testlib.h is fully compatible with Polygon problem preparation system.

First versions of testlib.h appeared in 2005 as a result of testlib.pas porting on C++. Since then testlib.h has evolved, its features and performance were improved. Last versions of testlib.h are compatible with different versions of Visual Studio compilers and GCC g++ (in editions for many platforms), also it is compatible with C++11.

Теги testlib, testlib.h

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский KAN 2022-07-07 20:44:13 260
ru9 Русский KAN 2022-07-07 20:39:14 204
en2 Английский MikeMirzayanov 2015-06-08 22:09:26 20
en1 Английский Zlobober 2015-06-08 20:43:25 2335 Added English translation
ru8 Русский MikeMirzayanov 2015-06-08 01:29:17 0 (опубликовано)
ru7 Русский MikeMirzayanov 2015-06-08 01:21:37 7 Мелкая правка: 'h имеет поддержку' -> 'h имеет полную поддержку'
ru6 Русский MikeMirzayanov 2015-06-08 01:21:11 21
ru5 Русский MikeMirzayanov 2015-06-08 01:20:00 109
ru4 Русский MikeMirzayanov 2015-06-03 13:35:51 112
ru3 Русский MikeMirzayanov 2015-06-03 01:23:52 323
ru2 Русский MikeMirzayanov 2015-06-03 01:16:48 2 Мелкая правка: 'нии *генереторов* &md' -> 'нии *генераторов* &md'
ru1 Русский MikeMirzayanov 2015-06-03 01:15:54 1715 Первая редакция