You can use several words in query to find by all of them at the same time. In addition, if you are lucky search understands word forms and some synonyms. It supports search by title and author. Examples:

  • 305 — search for 305, most probably it will find blogs about the Round 305
  • andrew stankevich contests — search for words "andrew", "stankevich" and "contests" at the same time
  • user:mikemirzayanov title:testlib — search containing "testlib" in title by MikeMirzayanov
  • "vk cup" — use quotes to find phrase as is
  • title:educational — search in title

Results

1.
By MikeMirzayanov, 4 years ago, In English
In Problems Statements, Example Inputs Are Now Highlighted if Test Cases Are Used <img src="/predownloaded/c1/64/c164a37e70461b3b6a0236b7e72c81c7f9b47d8d.png" style="width: 200px; float: right; margin: 1em 0 0 0;"/> Hello, Codeforces. Look what an interesting thing I've been working on the last few days. Now, if a problem uses test cases and its validator is written in the recommended way (using setTestCase), then the example inputs are displayed using different colors. Just follow the link and see how beautiful it turned out: <a href="https://codeforces.me/contest/1714/problems">https://codeforces.me/contest/1714/problems</a>! So far I have enabled this only for the last few rounds, but if everything works as intended, I will enable it for more rounds. In order to support this, I had to tinker a lot. I made changes to [testlib.h](https://github.com/MikeMirzayanov/testlib) so that the validator can return test markup. Support for this markup required changes in various system services. But I think it's worth it! The coolest thing is that it wa...
/MikeMirzayanov/testlib) so that the validator can return test markup. Support for this markup

Full text and comments »

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

2.
By MikeMirzayanov, 10 years ago, translation, In English
Codeforces: summing up 2016 year <center> <img src="http://assets.codeforces.com/images/Happy-New-Year-HD-Wallpapers.jpg"/> </center> Somehow it turns out that for me, each coming the New Year means more and more. This is an excellent opportunity to take stock, to breathe fresh air and to go through a kind of catharsis. This is a rare opportunity to be with the family, dress up in Santa Claus and just have fun. Holidays give me a clear criterion that I do the right things. If during the holidays, I begin to think about it, to recall some deferred ideas, eager to implement something new. So I’m doing right things. My things. And now exactly the same as in several recent years: during New Year holidays I write code for Codeforces, trying new technology or simply I’m making minor changes in testlib. It is necessary to me: at this moment are no deadlines, do not press the obligation. Just now, at 3 am, I can not break away from being able to do something new. I would like to take a moment and realize that spun in ...
Codeforces новое, вникаю в новую технологию или просто вношу мелкую правку в testlib. Надо мной в этот, for Codeforces, trying new technology or simply I’m making minor changes in testlib. It is necessary, write code for Codeforces, trying new technology or simply I’m making minor changes intestlib. It is, testlib. Надо мной в этот момент не стоят никакие сроки, не давят обязательства. Просто именно сейчас

Full text and comments »

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

3.
By KAN, 6 years ago, In English
Как провести Div 1 или Div 2 раунд на Codeforces Как вы наверняка знаете, большинство раундов на Codeforces созданы активными участниками нашего сообщества. Мы очень благодарны талантливым авторам со всего мира за то, что они знакомят десятки тысяч участников наших соревнований со своими идеями, предоставляя возможность учиться и получать удовольствие от решения задач как новичкам, так и лучшим в мире спортивным программистам. Этот пост расскажет, как стать автором задач и провести раунд на Codeforces. ## Кто может стать автором Обычно авторами наиболее интересных и качественных задач являются опытные участники. Так как наши ресурсы по обработке предложений задач ограничены, то с 1-го января 2021, для предложения своих задач вы должны удовлетворять следующим условиям: - рейтинг &mdash; 2100 или выше, или - уже был автором. В будущем ограничения могут быть изменены, пост будет обновлен. Если вы уже открыли ваш раунд для ревью, то он будет рассмотрен независимо от действующих ограничений, не волнуйтесь. Если вы не подхо...
generators is done with testlib.h <http://codeforces.me/<B>testlib</B>> library, you can read, with testlib.h <http://codeforces.me/<B>testlib</B>> library, you can read the introduction by, генераторы пишутся, используя библиотеку testlib.h <http://codeforces.me/<B>testlib</B>>. Вы, пишутся, используя библиотеку testlib.h <http://codeforces.me/<B>testlib</B>> . Вы можете прочитать

Full text and comments »

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

4.
By MikeMirzayanov, 4 years ago, In English
Testlib: tests + CI Hello, Codeforces. I have wanted for a long time and now, finally, I sat down and did it. Many of you are familiar with my [Testlib](https://github.com/MikeMirzayanov/testlib) project. This is a library that helps you develop problems if you are using C++. In the case of problems for Codeforces rounds, its use is mandatory. It seems to me that it is almost a de facto standard for preparing materials for completely different olympiads and competitions. The history of С++-Testlib is almost lost in centuries, I published the first version in 2005. Nowadays, making edits to Testlib has become tricky. The code grown to thousands of lines, also it has too long a history. This increases the likelihood of accidentally changing some aspect of behavior, which will jeopardize the holding of a Codeforces round or another important competition. In short, making a bug in this code or changing behavior anywhere is highly discouraged. So I recently took the plunge and wrote some test...
Testlib: tests + CI, If you understand well how some functionality of Testlib works, then you can add a test for it, In total tests run in 33 jobs! Look here https://github.com/MikeMirzayanov/ testlib/actions/runs, Many of you are familiar with my [Testlib](https://github.com/MikeMirzayanov/ testlib) project. This, Nowadays, making edits to Testlib has become tricky. The code grown to thousands of lines, also it, So I recently took the plunge and wrote some tests for Testlib. Here's what tests can do now:, The history of С++-Testlib is almost lost in centuries, I published the first version in 2005.

Full text and comments »

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

5.
By MikeMirzayanov, 7 years ago, translation, In English
Testlib: Opts — парсинг параметров командной строки Привет! Мне кажется все последние годы я что-то писал прям в то время, пока все нормальные люди отмечают Новый год. Это прям традиция какая-то. Собственно, большая часть базовой функциональности Codeforces была написана в новогодние праздники 2010-го года: авторизация, блоги, базовая поддержка соревнований. Возможно, я хочу провести и следующий год с интересом что-то улучшая в инфраструктуре Codeforces (да-да, как Новый год встретишь &mdash; так его и проведёшь). А может просто в Новый год вроде работать не обязательно и делаешь не то, что вот прям сейчас надо, а то, что хорошо бы когда-нибудь сделать. В этот раз я выделил чуток времени, чтобы добавить в <a href="https://github.com/MikeMirzayanov/testlib">testlib</a> поддержку разбора параметров командной строки. Мне очень не нравится в генераторах писать такое `int n = atoi(argv[3]);`. Собственно по нескольким причинам: * небезопасно к тому, что 3-го параметра командной строки может и не быть; * небезопасно к тому, что 3-...
Testlib: Opts — parsing command line options, Testlib: Opts — парсинг параметров командной строки, for parsing command line parameters in testlib <https://github.com/MikeMirzayanov/<B>testlib</B>>, look at my last commits <https://github.com/MikeMirzayanov/<B>testlib</B>/commits/dev-mikemirzayanov>, /MikeMirzayanov/testlib">testlib поддержку разбора параметров командной строки. Мне очень не, /testlib">testlib поддержку разбора параметров командной строки. Мне очень не нравится в генераторах, ="https://github.com/MikeMirzayanov/testlib">testlib. I really don't like to write such lines of code, мои последние коммиты <https://github.com/MikeMirzayanov/<B>testlib</B>/commits/dev-mikemirzayanov>

Full text and comments »

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

6.
By MikeMirzayanov, 10 years ago, translation, In English
Для авторов контестов: новый порядок подачи заявок <i>В 2021-м году некоторые детали, в том числе требования к авторам были изменены. Подробности прочтите здесь <a href="https://codeforces.me/blog/entry/85259">https://codeforces.me/blog/entry/85259</a>.</i> Привет, Codeforces! Новый год приносит изменения в состав команды Codeforces. <a href="/blog/entry/49466">Как вы уже, наверное, знаете</a> [user:GlebsHP,2017-01-04] завершил свою работу в качестве главного координатора Codeforces. Глеб, спасибо большое! Ты сделал отличную работу, помог провести большое количество интересных раундов. Ты настоящий профессионал, интересный человек, у тебя безупречный вкус к задачам, и сам ты зарекомендовал себя ярким и талантливым автором. Спасибо, что ты был с нами! Надеюсь еще не раз увидеть твои задачи на Codeforces! На смену Глебу пришел Николай [user:KAN,2017-01-04] Калинин. Он тоже опытнейший участник, уже провел в качестве координатора несколько раундов. Николай серьезно занимается программированием с седьмого класса (12 лет). Его о...
использовании testlib <http://codeforces.me/<B>testlib</B>>. Это совсем не сложно, а разобравшись, подготовленных задач, прочитайте все статьи об использовании , /testlib">testlib. It is not difficult, but once you understand, you will be able to prepare high, ="http://codeforces.me/testlib">testlib. It is not difficult, but once you understand, you will

Full text and comments »

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

7.
By MikeMirzayanov, 3 years ago, In English
Polygon: Warnings for Packages — Incomplete Tests + Statement/Validator Mismatches Hello, Codeforces! If you're developing problems in Polygon, you might like this image to attract attention. <center> <img src="/predownloaded/b4/b6/b4b6e46dd5811c89440ee98bce405e54e3b905c6.png"/> </center> <i>For the new members of the community, I would like to remind you that Polygon (https://polygon.codeforces.com/) is a system developed and maintained by Codeforces for preparing programming problems. It is there that authors and coordinators develop all the problems for the rounds. Moreover, I believe a significant (large?) portion of the problems for other competitions is also developed there: various stages of ICPC, national competitions of different levels, educational problems for various courses, etc. <b>In 2023, more than 50000 problems were prepared in Polygon (only those for which a package was compiled are counted)!</b></i> We often implement such improvements in Polygon that make the process of preparing a problem more reliable. These often include var...
features of Testlib: for reading arrays, use readInts/readLongs etc. Whenever possible, check, validators written in Testlib. They will work only if you write the validator correctly: * Use, Both of these innovations exploit validators written in Testlib. They will work only if you write

Full text and comments »

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

8.
By PrinceOfPersia, 12 years ago, In English
Codeforces Round #299 Hi. Codeforces round #299 is gonna take place soon([exact time](http://www.timeanddate.com/worldclock/fixedtime.html?day=14&month=4&year=2015&hour=19&min=30&sec=0&p1=166)) and I'm the writer. I'm lucky to be the first Iranian author in Codeforces, in your and our new year (2015 and 1394). Now, I wanna thank: myself([user:PrinceOfPersia,2015-04-05]) for writing the problems([:P](/blog/entry/16996#comment-217994)), [user:MikeMirzayanov,2015-03-26] for great Codeforces and Polygon platform, [user:Zlobober,2015-04-05] and [user:DamonSalvatore,2015-04-05] and [user:sobhan.miryoosefi,2015-04-05] for helping me prepare this round, [user:Haghani,2015-04-05] and [user:SoroushE,2015-04-05] for testing this round, [user:Delinur,2015-03-26] for translating problem statements into Russian and big thanks to my great buddy, [user:Swift,2015-04-05] for problem legends and the pictures. Also, I wanna thank [user:xiaodao,2015-04-05] for teaching me how to use polygon and testlib and so much oth...
wanna thank [user:xiaodao,2015-04-05] for teaching me how to use polygon and testlib and so much, Also, I wanna thank [user:xiaodao,2015-04-05] for teaching me how to use polygon andtestlib and so

Full text and comments »

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

9.
By geranazavr555, 7 years ago, translation, In English
Обновления Polygon (июнь-октябрь 2019) Hello, Codeforces! Я и [user:cannor147,2019-11-07], будучи студентами Университета ИТМО, в июне присоединились к разработке Codeforces. С июня по октябрь мы преимущественно занимались развитием платформы Polygon. В этом посте нам бы хотелось представить вам список того, что мы сделали за это время. В этот список не включены мелкие баг-фиксы или какие-то незаметные пользователям улучшения. #### Пин-коды для контестов и задач Иногда в Polygon разрабатываются особо важные контесты и задачи. В таком случае председатель жюри может быть обеспокоен возможностью утечки, например из-за слабого пароля другого члена жюри. Пин-код &mdash; дополнительный фактор подтверждения доступа к задаче или контесту, его может установить или изменить только владелец задачи или контеста. Предполагается, что пин-код будет передан каким-то отдельным надежным каналом связи. Теперь в интерфейсе контеста для владельцев появилась ссылка Create Pin: ![Create Pin в интерфейсе](https://i.ibb.co/bgcg8Cq/p...
in read*s (readInts, readDoubles, ...) testlib methods in the validator, and if it is not the case, проверяет, что в валидаторе в read*s (readInts, readDoubles, ...) методы testlib передаются имена, Now Polygon checks that variable names are passed in read*s (readInts, readDoubles, ...)testlib, Теперь Polygon проверяет, что в валидаторе в read*s (readInts, readDoubles, ...) методыtestlib

Full text and comments »

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

10.
By kuviman, history, 11 years ago, translation, In English
Codeforces Updates (April-May, 2015) Hello! Codeforces never sleeps, and I am going to tell you about our recent updates which weren't announced yet. ### Testlib - testlib moved to [GitHub](https://github.com/mikemirzayanov/testlib), and the version 0.9.9 with C++11 support has been released. ### Polygon - Added basic support for test groups. Now you can specify group for each test, run invocations by test groups, and you can view summary for each group on the invocation page. If group is specified for a test, it will be added to the problem descriptor (i. e. `<test cmd="gen 1 2" group="testGroup" method="generated"/>`). - You can now view problem statements and validator for a problem/contest on the same page. This makes finding mistakes in translations and in validator much easier (before you had to open them on separate tabs and switch between them, which is not comfortable). On the problem statements page the "Review" link has been added: <br/> ![ ](http://codeforces.me/predownloaded/22/8b/228bf6f506072...
weren't announced yet. ### Testlib - testlib moved to [GitHub](https://github.com/mikemirzayanov, последних изменениях, ранее не упоминавшихся. ### Testlib - testlib переехал на [GitHub](https, ### Testlib - testlib moved to [GitHub](https://github.com/mikemirzayanov/ testlib), and the, ### Testlib - testlib переехал на [GitHub](https://github.com/mikemirzayanov/ testlib), выпущена

Full text and comments »

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

11.
By MikeMirzayanov, 8 years ago, translation, In English
Testlib and Polygon Updates [July, 2018] Hello, Codeforces. This is a short blog to introduce you recent updates in [Testlib](https://github.com/MikeMirzayanov/testlib) and [Polygon](http://polygon.codeforces.com). # Testlib ### Generate a Permutation Now, you can easily generate a permutation with codes like this: Code | Result -|- `vector<int> p = rnd.perm(n);`| Generates 0-indexed permutation of size $n$ `vector<int> p = rnd.perm(n, 1);`| Generates 1-indexed permutation of size $n$ ### Function `println` Now, you can easily print space-separated lines in a generator. A `println` uses `cout`, thus prefer faster method if you print huge data. Some examples: Code | Result -|- `println(5);` | Print 5 and line break `println(1, 2, 3);` | Print `1 2 3` (three space separated integers) and line break `println("one", "more", 5.5);` | Print `one more 5.5` (three space separated items) and line break `vector<int> a; ...; println(a);` | Print vector $a$ (separate elements with spaces) and line break...
Testlib and Polygon Updates [July, 2018], # Testlib, Hello, Codeforces. This is a short blog to introduce you recent updates in [ Testlib](https, This is a short blog to introduce you recent updates in [Testlib ](https://github.com/MikeMirzayanov

Full text and comments »

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

12.
By Sammarize, 12 years ago, translation, In English
Путь проблемсеттера _Процесс творения раунда без прикрас и страшилок._<br> _Путеводитель по творению раунда от автора четырёх Codeforces раундов._ Спасибо [user:RodionGork,2014-06-10], который придал мне необходимый испульс и [user:lucAbalo,2014-06-10], который придал необходимый импульс [user:RodionGork,2014-06-10]. ### **1. Придумывание задач.** Тут сложно дать какой-то совет. Нет какого-то определённого алгоритма придумывания задач, а если бы он был, получились бы не задачи, а сложные упражнения на стандартные алгоритмы, как половина задач на [Russian Code Cup](http://www.russiancodecup.ru/). Чтобы получилась хорошая, интересная задача, должна быть какая-то идея, которая пришла в голову Вам, а потом должна прийти в голову участникам соревнования. Какая-то, хотя и самая элементарная, но идея, в идеале, должна быть даже в задаче A второго дивизиона. Так что, должен сразу предупредить, что, поскольку творческое мышление &mdash; процесс, воспитываемый с самого детства, то придумывать задачи дано ...
author's solution. Library `testlib` is used for writing checkers. It is simple and handy for creating, раз в 10 сложнее, чем решение. При написании чекера используется testlib. Это простая и удобная, Library `testlib` is used for writing checkers. It is simple and handy for creating checkers, При написании чекера используется testlib. Это простая и удобная библиотека для написания чекеров

Full text and comments »

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

13.
By fcspartakm, history, 11 years ago, translation, In English
Обновления Testlib и Polygon (июнь 2015) Всем привет! Раньше мой вклад в развитие Codeforces ограничивался подготовкой раундов ([contest:508], [contest:518], [contest:525]). Но месяц назад я присоединился к работе чудесной команды Codeforces во главе с Михаилом Мирзаяновым ([user:MikeMirzayanov,2015-06-29]). Традиционно, чтобы вникнуть во все тонкости этого проекта, моя работа началась с системы Polygon. Хотелось бы рассказать Вам о ее изменениях. Напомню, что [Polygon](https://polygon.codeforces.com/) &mdash; это система для подготовки задач по программированию. Именно в ней подготавливаются все задачи к раундам Codeforces и многим другим олимпиадам. Системой Polygon могут пользоваться все желающие в любой момент времени. Для редактирования файлов в Polygon теперь используется [Ace Editor](http://ace.c9.io/). В нем есть приятная глазу подсветка синтаксиса и автодополнение (нужно нажать Ctrl + Space). В скором времени планируется внедрить этот редактор и в Codeforces. ![ ](http://codeforces.me/predownloaded/33/e...
Testlib and Polygon Updates (June, 2015), Обновления Testlib и Polygon (июнь 2015), [Testlib library](https://github.com/MikeMirzayanov/testlib), which also work in Polygon. Now you, /9a9d6c848daa0b7c7e8ae3641a11c3c886217999.png) В [библиотеку Testlib ](https://github.com/MikeMirzayanov, Also useful changes have been made in [Testlib library](https://github.com/MikeMirzayanov/testlib, Besides it in testlib/Polygon appeared additional functionality, which we called features. Often, В [библиотеку Testlib](https://github.com/MikeMirzayanov/testlib) также были внесены полезные, Кроме того в testlib/Polygon появилась дополнительная функциональность, которую мы назвали features

Full text and comments »

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

14.
By ifsmirnov, history, 9 years ago, translation, In English
Jngen: универсальный генератор тестов Два года назад я [вкидывал](http://codeforces.me/blog/entry/20108) в сообщество идею о библиотеке, которая умеет генерировать разные клёвые тесты. Я долго крутил идею в голове и наконец попытался что-то написать. Реализовано пока далеко не всё из того, что хочется, но то, что уже есть, я активно использую в своих задачах. Итак, встречайте: https://github.com/ifsmirnov/jngen. Саму библиотеку (точнее, единственный хедер jngen.h) можно скачать [тут](https://raw.githubusercontent.com/ifsmirnov/jngen/master/jngen.h). Jngen умеет работать с массивами, деревьями и графами, а также генерировать немного строк и геометрии. Есть парсер опций командной строки и клёвая SVG-рисовалка. Можно делать, например, так. ~~~~~ cout << Array::id(10).shuffled().add1() << endl; // permutation of elements from 1 to 10 cout << Tree::random(100000, 20) << endl; // "long" tree with elongation 20 pair<string, string> test = rnds.antiHash({{mod1, base1}, {mod2, base2}}, "a-z", 10000); // should be s...
[user:MikeMirzayanov,2017-07-03] for testlib which was a massive source of inspiration on early, [user:MikeMirzayanov,2017-07-03] за testlib, из исходников которого на первых порах зачерпнулось немало, итоге получается даже быстрее, чем с testlib. Буду рад, если потыкаетесь, поделитесь ощущениями и, /jngen/blob/master/doc/library_build.md) which makes it compile even faster than testlib., /library_build.md) which makes it compile even faster than testlib. I'll be happy if you try it and, /library_build.md), и в итоге получается даже быстрее, чем с testlib.

Full text and comments »

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

15.
By Xellos, history, 7 months ago, In English
C++ quirks: variable shadowing C++ is a very permissive language. It'll let you write basically anything on the assumption that you know what you're doing... or let you shoot yourself in the foot if you don't. For example: ```cpp class C { int a; public: C(int a) : a{a} {} }; ``` It's a fairly common pattern in simple class design that's perfectly fine until it's not. The class member and constructor argument (c.arg.) have the same name. This is known as shadowing and compilers will warn you about it, though you need to use a flag `-Wshadow` that isn't included among `-Wall` or `-Wextra`. Another example of shadowing is ```cpp for(int i = 0; i < t; i++) for(int i = 0; i < n; i++) ``` which is fine if the first `i` isn't used for anything except making a loop (such as over test cases) but otherwise it's a solid source of bugs, especially if you "fix" it into `for(int j = 0; j < n; i++)`. ### How does shadowing work? First off, when can one variable shadow another? The standa...
c.arg. repeatedly again (lines ~2030, ~3310). _What mode?_ Mode in testlib can be file opening mode, ### Fixing testlib, Compiling a [testlib](https://github.com/MikeMirzayanov/testlib/blob, The resulting pull request is [here](https://github.com/MikeMirzayanov/testlib /pull/228). Not all, What if you want to deal all the pesky warnings in your code but testlib is still spamming your

Full text and comments »

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

16.
By errorgorn, 5 years ago, In English
Catalan Numbers and Generating Uniform Balanced Bracket Sequences Hi everyone! Today [user:nor,2022-05-27] sir and I would like to talk about generating uniform bracket sequences. Over the past few years when preparing test cases, I have had to generate a uniform bracket sequence a few times. Unfortunately I could not figure out how, so I would like to write a blog about this now. Hopefully this blog would be useful to future problem setters :) Scroll down to the end of the blog to copy our generators. First, let's define some things. A bracket sequence is a string with $n$ $\texttt{(}$ s and $n$ $\texttt{)}$ s. A **balanced** brackets sequence is a bracket sequence with the additional constraint that it becomes a valid arithmetic expression when we add some $\texttt{1}$ s and $\texttt{+}$ s. Let $p$ be the prefix sum array of a bracket sequence (we assign $1$ to $\texttt{(}$ and $-1$ to $\texttt{)}$ and take the prefix sum). For example, if our bracket sequence is $\texttt{())()((())}$, then $p=[1,0,-1,0,-1,0,1,2,1,0]$. An alternate way to thi...
talking, here are the codes (I used testlib $[7]$). They are written by both [user:nor,2022-05-27, Ok enough talking, here are the codes (I used testlib $[7]$). They are written by both [user:nor

Full text and comments »

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

17.
By I_love_Hoang_Yen, history, 11 years ago, In English
Validators with testlib.h If you have written some programming problems, and have prepared test cases, you will probably experience the terrible feeling that some test cases may be invalid (meaning it does not agree with the constraints in problem statement): upper bound can be violated, your graph not satisfied connectivity requirements or is not at tree... It is reasonable to feel that way. Even experienced problem setters make mistakes sometimes (for example, in the prestigious ACM ICPC World final 2007). It is strictly recommended to write a special program (called _validator_) to formally check each test to satisfy all requirements from problem statements. Validators are strictly required for problems on Codeforces. [Polygon](https://polygon.codeforces.com) has built-in support of validators. It is really easy to write a validator using testlib.h. ## Example Following is a validator that could be used for problem [problem:100541A]: ~~~~~ #include "testlib.h" int main(int argc, char* argv...
/testlib/tree/master/validators)., ://github.com/MikeMirzayanov/testlib/tree/master/validators) ## Available methods The first, More examples can be found at [the Github repo](https://github.com/MikeMirzayanov/testlib/tree, Reference: [Github page of testlib.h](https://github.com/MikeMirzayanov/testlib /blob/master, Ссылки: [страница testlib.h на Github](https://github.com/MikeMirzayanov/testlib /blob/master

Full text and comments »

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

18.
By MikeMirzayanov, 11 years ago, translation, In English
Codeforces: что мы делали в 2015-м году <img src="http://mama-rasskazu.ru/uploads/posts/2015-08/1440572760_f105e8f59f1e0a010d1d065c71de75c6.jpg" style="float:right; margin:0 1em 1em 1em;"/> Добрый день. В прошедшем году мы не только занимались организацией раундов и [чемпионатов](/blog/entry/22335). Каждый день мы писали код, дебажили, тестировали и изучали разные инструменты и технологии, чтобы сделать Codeforces лучше. Даже если в какие-то периоды вы не видели сильных изменений на сайте, это вовсе не значило, что разработка стояла на месте &mdash; просто некоторые нововведения касаются исключительно инфраструктуры, архитектуры или административных интерфейсов и не всплывают к пользователям. Я собрал в список всех тех нововведений, которые в той или иной степени коснулись кого-то (или всех) из пользователей. В этом безликом списке нашли свое место результаты многодневной работы каждого члена (иногда c приставкой ex-) технической команды Codeforces: [user:MikeMirzayanov,2015-12-28], [user:MaximShipko,2015-12-28], [u...
завершенные небольшие задачи по testlib и другим мелким проектам (например, [PBOX](http://pbox.me, In addition, there are some small tasks completed on testlib and other small projects (for example, Кроме того, есть еще какие-то завершенные небольшие задачи по testlib и другим мелким проектам

Full text and comments »

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

19.
By ashmelev, 12 years ago, In Russian
Будьте осторожны с random_shuffle Всем привет! Может быть, эта тема уже обсуждалась, но по запросу "random" ничего похожего на Codeforces не нашел. Предыстория. Хотели с Сашей ([user:adrozdova,2015-03-26]) изучить декартово дерево. Для инициализации приоритетов рекомендуется использовать случайные числа, чтобы высота дерева не была очень большой. Соответственно, надо эти числа как-то получить. Я совсем не разбираюсь в структурах данных, поэтому не задумывался, насколько плохо будет дереву (и будет ли), если приоритеты нескольких вершин будут одинаковыми. Поэтому на всякий случай хотелось сделать их попарно различными (чего не гарантирует простое использование rand() при создании очередной вершины). Предложил следующий, "надежный" и "проверенный" метод &mdash; создать массив из N чисел, инициализировать его числами от 0 до (N-1) соответственно, применить к нему random_shuffle &mdash; и мы получим N различных ключей в случайном порядке. История. Саша стала сдавать задачи и на практике оказалось, что в нескольких за...
shuffle из testlib работает практически идеально, коэффициент по абсолютному значению почти всегда, shuffle из testlib:, testlib: ![ ](https://lh4.googleusercontent.com/-5qj4iHG6fM0/VRQXrV6iSaI/AAAAAAAABFo/YcZho1Qm2Dc/w638

Full text and comments »

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

20.
By fcspartakm, 10 years ago, translation, In English
Polygon: updates (January — April 2017) Hello, Codeforces! It is time to tell about the improvements in [Polygon](https://polygon.codeforces.com/). 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. ![ ](http://codeforces.me/predownloaded/98/10/9810d9c6ccbbab2e6a2f7ba59145647f77985dbe.png) [cut] <br/> 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 Prop...
#### Testlib, The useful changes were introduced also in [Testlib library](https://github.com/MikeMirzayanov, В [библиотеку Testlib](https://github.com/MikeMirzayanov/testlib) также были внесены полезные

Full text and comments »

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

21.
By tiger2005, history, 2 years ago, In English
Introduction to CPLib (2) — Modern C++ Library for Test Data in CP You can refer to the first introduction post [here](https://codeforces.me/blog/entry/124952). During the summer holiday, [user:yzy1,2024-08-06] has implemented several features for CPLib, the majority of which are designed to improve the compatibility with well-known testing systems. CPLib Initializers ------------------ If you need to use CPLib on an evaluation platform that does not natively support it, the best way to use it is to implement a custom initializer. The initializer needs to do three things: 1. Read and parse the command line arguments. 2. Set up the input/output streams and the Reader variable required by the program. 3. Set up the reporter. We're maintaining a set of initializers for mainstream platforms. Please refer to [the GitHub repository](https://github.com/rindag-devs/cplib-initializers). To implement a initializer yourself, you only need to inherit few classes and implement their member functions. Visit [the documentary](https://cplib.vercel....
Polygon](https://polygon.codeforces.com) | [testlib][testlib, ) | [testlib][testlib-checker] | [testlib-two-step][testlib-interactor-two-step, /interactor.hpp [testlib-checker]: https://github.com/rindag-devs/cplib-initializers/tree/main/include, ¹: You need to use [testlib-interactor-two-step] and [testlib-checker-two-step] together. Read

Full text and comments »

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

22.
By Xellos, 10 years ago, In English
Indexed set / array with wide functionality: treap ~~~~~ const int * int const * int * const int const * const const int * function (const arg) const return void(l = r = 0); ~~~~~ [link to repo](https://gitgud.io/Xellos/treapset) **VERSION 2.0 RELEASED!** Now with 100% less memory leaks or MLE verdicts. Project moved from Github. _The following text is for version 1.0._ Based on the e-maxx implementation and other stuff I found online, I pieced together a powerful treap. It can be used as a set<>, array, segment tree or (within limits) all of them at once. Consider a set<> represented as a sorted array of distinct elements. You can insert/remove elements just like in a set<>. You can also find the index of any element in this array, remove an element by index &mdash; or insert an element at an index, but that will probably break the sortedness and you can't use the operations which rely on it anymore (you can still insert/remove elements by index). As long as the array is sorted, you can query lower bound / upper ...
been broken yet) and `srand()`, which lets you choose your seed if you don't want thetestlib default., care with randomisation. It uses testlib random_t and if equal priorities are detected (at insert, I took special care with randomisation. It uses testlib random_t and if equal priorities are

Full text and comments »

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

23.
By MikeMirzayanov, 13 years ago, translation, In English
Codeforces: Results of 2013 Hello! Do you feel the breath of New Year? <img src="http://assets.codeforces.com/images/tree.png" style="float:right;margin: 0 1em 1em 1em;"/> The clock shows a day before New Year, so it is time to sum up the past. I do not have speech-writers for words in the style of "what recently seemed almost impossible, it becomes a fact of life" so I'll be short. Thank you all! Your unfading interest and constant help inspire Codeforces team for new achievements! Brilliant writers, invisible soldiers: testers, tireless and greedy for knowledge participants &mdash; all of you help Codeforces do better! I've dug into the records and made a partial list of the most notable major improvements of 2013. Some large improvements of our infrastructure are not in the list, as the community can not see them directly. * A simple way to add contest from [Polygon](https://polygon.codeforces.com/) to Codeforces::Gym. * Drafts embedded in text form fields in Codeforces and Polygon. * Multipl...
in the contest area. * Many improvements of [Testlib ](https://code.google.com/p/testlib, интерфейса участника соревнований. * Множественные улучшения библиотеки [ Testlib](https://code.google.com, . * Multiple interface improvements in the contest area. * Many improvements of [Testlib](https, . * Множественные улучшения интерфейса участника соревнований. * Множественные улучшения библиотеки [Testlib](https

Full text and comments »

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

24.
By MikeMirzayanov, history, 12 years ago, translation, In English
Генераторы на testlib.h Генераторы &mdash; это такие вспомогательные программы в задаче по программированию, которые выводят тесты. Далеко не всегда ручные тесты в задаче достаточно маленькие, чтобы обойтись только ими. В этом случае на помощь и приходят генераторы. Если вы пишете генератор на С++, то использование [testlib.h](https://github.com/MikeMirzayanov/testlib) &mdash; хороший выбор. ### Виды генераторов Есть два вида генераторов: обычные и мультигенераторы. 1. Первые за один свой запуск выводят ровно один тест. Обычно, чтобы сгенерировать несколько тестов, такой генератор надо запустить несколько раз с разными параметрами командной строки. Такие генераторы выводят тест в стандартный поток вывода (на экран). 1. Мультигенераторы за один запуск выводят сразу много тестов. Такие генераторы выводят тесты в файлы (один файл &mdash; один тест). ### Пример простого обычного генератора на testlib.h Выводит пару чисел от 1 до $n$, где $n$ &mdash; переданный параметр запуска генератора. ~~~~~...
[testlib.h](https://github.com/MikeMirzayanov/testlib) — хороший выбор., the [testlib.h](https://g...content-available-to-author-only...b.com/MikeMirzayanov/ testlib) library, -available-to-author-only...b.com/MikeMirzayanov/testlib) library., /MikeMirzayanov/testlib/releases) or directly at [the GitHub repository](https://github.com/MikeMirzayanov/testlib, To initialize a testlib generator, the first line of your generator must be of the form, Кроме того, не надо использовать `std::random_shuffle`, используйте `shuffle` из testlib. Он так же, Примеры генераторов можно найти в [дистрибутиве](https://github.com/MikeMirzayanov/testlib/releases, Чтобы инициализировать testlib-генератор, первая строка вашего генератора должна иметь вид

Full text and comments »

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

25.
By canine, history, 2 years ago, In English
yet another CP extension for VSCode hello all -- if you happen to be in the market for a new competitive programming extension and use VSCode, may i humbly suggest my new [extension](https://purduecpu.com/extension)? i think it is relatively feature complete, but it's still in alpha (especially for languages other than C++) and may have some kinks that need working out. it theoretically supports C++, Java, Python, and Rust (and it's very easy to add more). i created this because i was dissatisfied that most existing solutions can't import a bunch of test cases from a directory then run them in parallel. i also believe it has a cooler UI than other extensions. as usual, i didn't think it would take this long when i started... if you encounter any difficulties, please let me know on [github](https://github.com/canislupaster/cpu-vscode). **thanks for taking a look!** ![hero image](/predownloaded/f1/90/f190d6993497b2e6a93a505706e36189f5fd0200.jpg) ### Realtime Input/Output unlike other test runners for VSCode, w...
-- just use fcmp! thanks testlib). ![Test Settings & Editor](/predownloaded/36/ca, efficient solution. [testlib](https://github.com/MikeMirzayanov/testlib) is automatically included in, point is easy -- just use fcmp! thanks testlib).

Full text and comments »

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

26.
By MikeMirzayanov, 13 years ago, In Russian
Testlib 0.9.4 Это уже стало доброй традицией, что когда я еду в поезде или нахожусь в командировке, то вношу изменения в testlib. Видимо, причина тому &mdash; невозможность погрузиться в сложную задачу с большим контекстом по Polygon/Codeforces, но желание сделать что-то полезное здесь и сейчас. Напоминаю, что testlib &mdash; мощная библиотека и стандард де-факто для подготовки задач по программированию, если вы используете С++. С помощью testlib можно значительно упростить подготовку: валидаторов, генераторов, чекеров и интеракторов. Все эти программы ниже буду называть testlib-программами. <s>Вот <a href="https://testlib.googlecode.com/svn-history/r94/trunk/testlib.h">код ревизии, о которой идет речь</a>. А вот <a href="https://code.google.com/p/testlib/source/diff?path=/trunk/testlib.h&format=side&r=94&old_path=/trunk/testlib.h&old=62">ссылка с подсвеченными изменениями</a>, которая может заменить весь текст поста. Как только будет понятно, что последние изменения финализированы, то ...
Testlib 0.9.4, изменения в testlib. Видимо, причина тому — невозможность погрузиться в сложную задачу с большим, каких-то хакерских целей из-за нетипичного использования testlib. * Добавлена функция, которой идет речь. А вот , настоящее время testlib не порождает warnings даже при ключах -Wall -Wextra -Wconversion., `, приводит к аварийному останову testlib-программы, если аргумент равен `false`) приводил к, В промежуточных версиях были сложности с компиляцией testlib-программ в Borland C++, некоторых, Напоминаю, что testlib — мощная библиотека и стандард де-факто для подготовки задач по

Full text and comments »

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

27.
By brunomont, 3 months ago, In English
tgen::miniblog(4): random trees <center> <img src="/predownloaded/72/82/7282f22a0748c711b1964af0315893578b0d32d5.png" style="width: 350.0px;max-width: 100.0%;max-height: 100.0%;"> </center> <i>This is a blog 4 of a series of blogs about algorithmic challenges I came across when creating [tgen](https://codeforces.me/blog/entry/154468).</i> In this blog we will tackle: 1. Generate a uniformly random tree on vertices $[0, n)$ given some preset edges, in $\mathcal O(n)$ time. 2. Generate a skewed tree on vertices $[0, n)$ in $\mathcal O(n)$ time. ### 1. Uniform random tree with preset edges Sometimes we want to force some edges to appear in the tree, for example because the test needs a specific path or star substructure. The preset edges may span several connected components; we need to connect those components into a single tree. The key tool is the **[Prüfer sequence](https://en.wikipedia.org/wiki/Pr%C3%BCfer_sequence)**. Every labeled tree on $k$ vertices corresponds to a unique sequence of leng...
testlib `wnext` tree generator: [https://codeforces.me/blog/entry/18291](https://codeforces.com

Full text and comments »

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

28.
By xuanquang1999, history, 7 years ago, In English
Generators with testlib.h What are generators? -------------------- Generators are helper programs that output test. Most programming task usually has a large input (for example, an array of up to $2 * 10^5$ elements, a tree of up to $10^5$ vertices), so it's not possible to add all the tests manually. In these cases, generators come to the rescue. If you are writing a generator in C++, it is recommended to use the [testlib.h](https://github.com/MikeMirzayanov/testlib) library. Types of generators ------------------- There are two types of generators: 1. **Single-test generator:** output exactly one test in a single run. Usually, to generate several tests, one must run the generator several times with different command line parameters. Such generators output the test to the standard output stream (to the screen). 2. **Multiple-test generator:** output many tests in a single run. Such generators output tests to files (one file for each test). An example single-test generator with testlib.h -...
/MikeMirzayanov/testlib) library., /MikeMirzayanov/testlib/releases) or directly at [the GitHub repository](https://github.com/MikeMirzayanov/testlib, To initialize a testlib generator, the first line of your generator must be of the form

Full text and comments »

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

29.
By MikeMirzayanov, history, 12 years ago, translation, In English
Коротко о testlib.h _Раздел о testlib является временным, он будет влит в общий раздел документации, когда таковой появится._ Если вы разрабатываете задачу по программированию и делаете это на C++, то testlib.h &mdash; это правильный выбор для того, чтобы написать вспомогательные программы. Эта библиотека является фактически стандартом де-факто в профессиональном сообществе авторов задач по всему миру. С помощью testlib.h подготовлены всероссийские и международные олимпиады школьников, этапы ICPC, все раунды Codeforces и многие другие соревнования. Библиотека testlib.h [доступна на GitHub](https://github.com/MikeMirzayanov/testlib). Библиотека testlib.h имеет очень простое распространение &mdash; она размещена в одном заголовочном файле. Для ее использования достаточно положить testlib.h рядом с разрабатываемой программой (чекером, генератором, валидатором или интерактором) и просто добавить в исходный код `#include "testlib.h"`. Вот когда вам поможет testlib.h: * [при написании *генераторо...
You can find testlib.h [on GitHub](https://github.com/MikeMirzayanov/testlib)., _Section about testlib is temporary, at some day it will be merged into global documentation, _Раздел о testlib является временным, он будет влит в общий раздел документации, когда таковой, Библиотека testlib.h [доступна на GitHub](https://github.com/MikeMirzayanov/ testlib).

Full text and comments »

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

30.
By Zlobober, history, 11 years ago, In English
Checkers with testlib.h Introduction ------------ Checker is a program that should be written when task allows more than one correct solution. Although it seems that it is very easy to write checker, there are lots of important technical details that are easy to forget if you don't use a special library like testlib.h. A common convention is that a checker should be a program taking three command-line arguments: the testdata filename, the participant output filename and the jury answer filename. Checker should read the contents of the input, output and answer, decide whether participant answer is correct (and optimal being compared to the jury's answer if there can be unoptimal answer in this task) and return one of several pre-defined verdicts: | Verdict | testlib macro | meaning | |---------|---------------|---------| | Ok | `_ok` | The output is correct, follows the output format and represents an optimal answer (if applicable in this problem). | | Wrong Answer | `_wa` | The output is wrong or...
(like readInt, readLong, readDouble, readToken etc) are common for all testlib uses: checkers, return one of several pre-defined verdicts: | Verdict | testlib macro | meaning, . registerTestlibCmd(argc, argv); // Now there are three global variables specifyingtestlib streams, | Verdict | testlib macro | meaning | |---------|---------------|---------| | Ok | `_ok` | The

Full text and comments »

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

31.
By dario2994, 4 years ago, In English
pol2dom: Convert problems from Polygon to DOMjudge TL;DR: I am advertising [pol2dom](https://github.com/dario2994/pol2dom): a tool to convert a set of problems prepared in Polygon into a DOMjudge contest. The whole process is automated: downloading the Polygon package, converting it into a DOMjudge package, and uploading the DOMjudge package to a DOMjudge server. If you are organizing a contest that uses DOMjudge, I invite you to give `pol2dom` a try. #### Long story [Polygon](https://polygon.codeforces.com/) is the platform used to prepare problems for Codeforces rounds (and, at least one year ago, for Codechef rounds). It has [many issues](https://codeforces.me/blog/entry/90914) but, as far as I know, it is the best platform for preparing competitive programming problems. It has a large number of checks that catch common mistakes, it is hosted online, it allows a coordinator to quickly review the preparation, and so on. As everyone, I would like to see Polygon improve (for example, with a decent UI), but there's nothing ...
fact that it supports testlib, or that it supports interactive problems, that it supports balloon

Full text and comments »

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

32.
By MikeMirzayanov, 15 years ago, translation, In English
Codeforces::Тренировки <p> Как говорится &quot;Мы строили, строили и, наконец, построили&quot;. Или во всяком случае близки к этому. </p> <p> 19-го января 2012 года в 12:00 мы открываем подпроект &quot;Тренировки&quot; (по-английски мы назвали его &quot;Gym&quot;, т.е. спортзал). Если коротко, то его цель предоставить сервис для того, чтобы на Codeforces вы могли не только участвовать в соревнованиях и обсуждать их, но и удобно тренироваться и тренировать. </p><p> В самом деле, при всем разнообразии online judges в мире, толкового сервиса для проведения тренировок не существует. Что хочется от такого сервиса: </p> <ol> <li> Наличие базы виртуальных контестов, составленных преимущественно из прошедших официальных соревнований. </li><li> Возможность интегрировать результаты прошедших соревнований в виртуальные контесты, чтобы была возможность тренироваться &quot;против&quot; официальных участников. </li><li> Возможность в любое время дня и ночи поучаствовать в тренировке, не боясь, что что-то сломается и се...
answer is ambiguous. The checkers must be compatible with testlib in terms by command line arguments, желательны. Чекеры нужны только, если ответ неоднозначен, должны быть совместимы сtestlib в плане, testlib in terms by command line arguments (checker-file input output answer) and return codes (OK, testlib в плане аргументов командной строки (checker-file input output answer) и возвращаемых кодов (OK

Full text and comments »

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

33.
By DANDROZAVR, history, 6 years ago, In Russian
Нужна помощь с testlib/с Яндекс Контестом Предисловие: Нужно подготовить задачу на открытые тесты(каждый тест оценивается в какое-то количество балов), и хотелось бы на сервисе Яндекса. Нашел вариант с компилятором Make2 + компилированием с помощью Makefile, doit.sh, select_file.py(вот это все для отправки готовых ответов в виде архива => разархивирования архива) и постпроцессинга с выставлением балов файлом postprocessor_sum_points.py(пишу название для тех, кто шарит :) А теперь к проблеме. Чтобы я не делал, чекер, использующий testlib всегда выдает одну и туже комбинацию Crash(Exitcode 7) + оценка баллов: ![ ](https://sun9-31.userapi.com/c206820/v206820826/136b04/JTAvqZKLiYk.jpg) Заглянув в документацию testlib.h, можно увидеть это: ![ ](https://sun9-65.userapi.com/c206820/v206820826/136b24/qqGom4sgvsQ.jpg) Вопрос 1: Я не совсем понимаю, в каких случаях возникает этот exitcode. Это же не сама ошибка в программе(ведь тогда бы было что-то вроде SISGEV), но тогда что это и почему нет никаких пояснений? Воп...
Нужна помощь с testlib/с Яндекс Контестом, UPD: Решается обычным костылем "#define POINTS_EXIT_CODE 0". Видимо, все чекеры testlib с points, testlib всегда выдает одну и туже комбинацию Crash(Exitcode 7) + оценка баллов: ![ ](https://sun9-31, А теперь к проблеме. Чтобы я не делал, чекер, использующий testlib всегда выдает одну и туже

Full text and comments »

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

34.
By Handled, history, 11 years ago, In English
Prepare a mashups contest using polygon system for newbies First things first, I'm so sorry because of my bad english, if have any confusions in wording. Thanks :) Okay, here we go ! ### **Step 1:** You have to prepare problems for contest. Have many ways to do this, but i recommended using [polygon](http://polygon.codeforces.com) system &mdash; The professional way to prepare programming contest problem. - Create an account on polygon system. - After login, you'll see Dasboard Screen like this ![ ](http://codeforces.me/predownloaded/fa/ec/faec1a8a63529b648a251692e0a7dd1c67acc0db.png) - Choose tab New Problem - Start Edit Session ![ ](http://codeforces.me/predownloaded/4c/1a/4c1a448447dd6035cdd179598bb245bb05d38883.png) ### **Step 2:** #### • **General Info** - Input file &mdash; input file name or "stdin" in case of standard input - Output file &mdash; output file name or "stdout" in case of standard output - Time limit &mdash; time limit per test in milliseconds - Memory limit &mda...
to use English for it. - The best way to prepare checker is to use testlib library from the, - The best way to prepare checker is to use testlib library from the [testlib ](http

Full text and comments »

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

35.
By gepardo, history, 8 years ago, In English
ParmPars: a library to pass parameters to generators Hello, Codeforces! If you tried to prepare some competitive programming problems, you might parse parameters like this: ```cpp #include "testlib.h" #include <cstdlib> using namespace std; int main(int argc, char **argv) { registerGen(argc, argv, 1); int n = atoi(argv[1]); int m = atoi(argv[2]); int k = atoi(argv[3]); ... ``` Of course, such way has many disadvantages: * You need to pass the exact amount of parameters, you cannot define default values for them. * If you have many parameters, it's easy to forget the order. * If you pass too few of the them, it will be undefined behavior. So I developed a library called ParmPars to pass parameters to generators in a more convenient way. You can find it on [GitHub](https://github.com/alex65536/parmpars). I hope it will help you to generate tests better. [cut] <br> Using ParmPars, you could rewrite the code above in the following way: ```cpp #include "testlib.h" #include "parmpars.hpp" ...
initializes both Testlib ad ParmPars. `DECLARE` macros are used to declare a variable and init it from the, : `initGenerator` is a function that initializes both Testlib ad ParmPars. `DECLARE` macros are used to

Full text and comments »

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

36.
By Not-Afraid, history, 6 years ago, In English
Bash Script for Stress Testing[Code with explanation] Hello Codeforces community. ~~~~~ Tl;dr: The script is specifically for *Unix and can be used to stress test `C++` solutions. It can be easily modified to work with python or java. To use it in windows you can download Ubuntu terminal which is officially available on Microsoft Store and then use it or you can modify the script to work in cmd by changing the .out files to .exe and a bit of syntax for cmd. ~~~~~ **Note**: If you don't want to read this lengthy blog, just go to [this](https://github.com/bhupixb/Stress-Testing-bash-script) repo and follow the instructions of readme. <br> First let me tell you what stress testing is if you don't know, Stress testing is technique using which we can run our solution (which we think might fail/is failing) on a number of random test cases and match it's output with the output of a solution which is a brute force solution or accepted solution of someone else.<br> If you don't know why and when to use stress testing you can use [...
or use testlib which is the best if you know how to use it. ~~~~~ Usage: Download [this, You can add things as you need them or use testlib which is the best if you know how to use it. ~~~~~

Full text and comments »

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

37.
By MikeMirzayanov, 14 years ago, In Russian
Релиз testlib.h — 0.8.5 **Update: Выпущен новый релиз 0.8.5**. Скачать новую версию вы можете с [сайта проекта](http://code.google.com/p/testlib/). Новая версия внедрена во все сервисы Codeforces и Polygon. Изначально этот пост содержал информацию о девелопмент-версии, но сейчас он используется для описания версии 0.8.5. Библиотека testlib &mdash; самая популярная и развитая библиотека для написания чекеров, генераторов, валидаторов и теперь интеракторов для задач. Первая версия testlib.h была написана мной в 2005-ом, и представляла по большей степени порт testlib.pas на С++. С тех пор многое было улучшено и расширено. В настоящий момент она активно используется в задачах Codeforces, разных этапах Всероссийской олимпиады школьников, многих петрозаводских контестах, всех саратовских соревнованиях и т.д. Вот основные изменения/улучшения. ### Комментарий программы: stdout -> stderr Теперь системные сообщения testlib-программ (чекеров, валидаторов, интеракторов) направляются в стандартный поток ошибо...
означало вердикт "правильный ответ на тест". Теперь testlib автоматически при выходе проверит что был в, , а новый testlib быстрее предыдущего примерно в 8 раз!, - предыдущий релиз testlib.h — 1.2 секунды, - паскалевский testlib от ИТМО — 3.5, - предыдущий релиз testlib.h — 2.8 секунды, - паскалевский testlib от ИТМО — 3 секунды, ://code.google.com/p/testlib/). Новая версия внедрена во все сервисы Codeforces и Polygon. Изначально этот, Библиотека testlib — самая популярная и развитая библиотека для написания чекеров, Теперь системные сообщения testlib-программ (чекеров, валидаторов, интеракторов) направляются в

Full text and comments »

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

38.
By fushar, 12 years ago, In English
Introducing tcframe: A New Test Cases Generator Framework Hello! I have been writing a new test cases generator framework for IOI-style problems for several months. It should be quite stable now, so I would like to share it to you. First of all, let me tell the source of inspiration of this new framework. #### testlib ([https://code.google.com/p/testlib/](https://code.google.com/p/testlib/)) I discovered [user:MikeMirzayanov,2015-03-29]'s testlib library when I prepared Codeforces Round #192 (a.k.a. Trollforces round). It is a nice library (thank you Mike!). I wanted to use it for generating test cases for our national training camps, but it seems that it is not quite suitable for IOI-style problems which have subtasks etc. So, I created a wrapper on top of it. #### tokilib ([https://github.com/fushar/tokilib](https://github.com/fushar/tokilib)) It is a wrapper on top of testlib. I actually wrote about it in a [blog post](http://codeforces.me/blog/entry/11149). It essentially will call testlib's generation many times ...
quite clean and neat! I completely rewrote it from scratc. It now does not depend ontestlib anymore. I, #### testlib, ([https://code.google.com/p/testlib/](https://code.google.com/p/testlib/)), I discovered [user:MikeMirzayanov,2015-03-29]'s testlib library when I prepared Codeforces Round, It is a wrapper on top of testlib. I actually wrote about it in a [blog post](http://codeforces.com

Full text and comments »

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

39.
By maroonrk, history, 5 years ago, In English
doubleCompare in testlib.h After the last ARC, one participant pointed out that the result is WA when the error is precisely the same as $EPS$ ([submission](https://atcoder.jp/contests/arc122/submissions/23379548)). For example, consider these two outputs: `331997010.50000000000000000000` (the jury output) and `331997342.4970105` (the user output). Their relative error is exactly $10^{-6}$, so when $EPS=10^{-6}$, this should get AC. However, with the current implementation of the doubleCompare function in testlib.h, the result is WA. This is because perturbations in the line 429 (`return result + 1E-15 >= minv && result <= maxv + 1E-15;`) don't work when the values of result/minv/maxv are large. We made a fix and sent [a pull request](https://github.com/MikeMirzayanov/testlib/pull/126). If you believe you were affected by this in the last ARC, please let me know. That being said, given the popularity of testlib.h and the fact that no one has ever raised this issue, I hope no one was affected by th...
fix and sent [a pull request](https://github.com/MikeMirzayanov/testlib /pull/126). If you believe, pull request](https://github.com/MikeMirzayanov/testlib/pull/126).

Full text and comments »

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

40.
By goldvitaly, 14 years ago, In Russian
testlib будущего или yet another testlib Всем привет! Думаю, что многие слышали, что в 2011 году вышел новый стандарт языка программирования c++. Возможности языка с новым стандартом существенно расширены, благодаря чему стало возможно делать довольно удобные вещи. Когда появляется что-то новое, то сразу хочется это попробовать на чем-нибудь полезным. Проект [testlib.hpp](https://github.com/AlexeyDmitriev/testlib.hpp) содержит реализацию библиотеки для разработки чекеров и генератов для олимпиадных задач. Идея разработать такую библиотеку совсем не новая, развитие множества таких библиотек происходит уже больше десяти лет. Такие библиотеки есть для огромного количества языков программирования. В России все начиналось с паскаля, потом появились библиотеки и для c++, python, java. Зачем нужна еще одна библиотека? Затеяв разработку этой библиотеки, я преследовал множество целей. 1. Первая цель была учебная. Эту библиотеку полностью разработали два человека: [user:AlexDmitriev,2012-12-30] и [user:map,2012-12-30]. Мне ...
testlib будущего или yet another testlib, >()); OK("1 number"); } ~~~~~ Отличия от [testlib.h](http://code.google.com/p/ testlib/) на этом, Отличия от [testlib.h](http://code.google.com/p/testlib/) на этом примере не столь существенны

Full text and comments »

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

41.
By djm03178, 2 years ago, In English
fread's behavior with line breaks UPD: I suppose that this is NOT the tests' fault. See https://codeforces.me/blog/entry/137318?#comment-1228025 . To be short, I think it goes like this: - `fread` reads all characters from the test, write them into the destination array. - `fread` looks for `"\r\n"`s (or just `"\r"`, idk), and remove `'\r'` from the array. Each of its occurence shifts the remaining part of the array to the left. - As a result, the final data gets shorter than the actual bytes it read from the file. However, it does not clear out the part after the shortened data. It returns the length of the shortened data, but if we check the data after it, we can see the leftovers. I can't find anything stating that `fread` is supposed to remove `'\r'`s from the reference, and it just feels really weird, but I guess this behavior's reason is explained at least. Searching further, I found that `stdin` is by default opened as text mode, and in that context `fread` can really truncate `'\r'`s to let users...
like this test shows that Polygon and testlib has no such procedure to integrate the format. I know, testlib has no such procedure to integrate the format. I know it normally doesn't cause much issue with

Full text and comments »

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

42.
By GreatShinobiOwl, history, 2 months ago, In English
Polyman v3: Let an AI Agent Build Your Problem (and Test It Before Polygon Sees It) About ten months ago, [Stop Fighting with Polygon — Create and Test Problems Locally] (https://codeforces.me/blog/entry/148803) was written. It introduced **Polyman**, a CLI for problem setters. You write the validator, generators, checker, and solutions on your own machine. One command, `polyman verify`, generates every test, validates it, and checks that every solution gets the verdict it should. Then `polyman remote push` sends the whole thing to Polygon. Thank you for the upvotes, the issues and the pull requests. A lot has changed since then, so here is what's new. **Upgrade:** ``` npm install -g polyman-cli@latest polyman --version # 3.0.0 ``` There is one breaking change in how generator scripts are written. See **Migrating from v2** at the end; it takes about two minutes. --- ## 1. Polyman is now built for AI agents This is the biggest change. More and more of us write code together with Claude Code, Codex, Cursor or Aider. A problem package is a good...
## 3. Much faster: compile cache and testlib built once, **testlib compiled once.** Polyman now compiles the body of `testlib.h` once per problem and links, - `polyman verify --no-cache`: **15.2 s** - `polyman verify`, first run: **9.5 s** (testlib is, ``` $ polyman cache status ℹ Prebuilt testlib 0.9.45: 490.6 KB, linked into everytestlib

Full text and comments »

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

43.
By MikeMirzayanov, history, 11 years ago, translation, In English
Search for Posts on Codeforces Hello. Now you do not have to go into Google if you need to search blog posts. You can do it directly on Codeforces. The implemented search is based on Apache Lucene . The index contains all open public posts, which are already more than 15,000 documents. Temporarily search for tags are now available (tags will be added to the index soon), but instead you have the opportunity to find posts and even sort using different criteria. By the way, you can use complete syntax of Lucene queries to search. Here is a short description of main features. You can use several words in query to find by all of them at the same time. In addition, if you are lucky search understands word forms and some synonyms. It supports search by title and author. Some examples: * `305` &mdash; search for 305, most probably it will find blogs about the Round 305 * `andrew stankevich contests` &mdash; search for words "andrew", "stankevich" and "contests" at the same time * `user:mikemirzayanov ti...
* `user:mikemirzayanov title:testlib` — search containing "testlib" in title by, title:testlib` — search containing "testlib" in title by [user:MikeMirzayanov,2015-12-23

Full text and comments »

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

44.
By Fefer_Ivan, 13 years ago, translation, In English
New feature of Polygon: tests for checkers and validators Good afternoon, Codeforces! Today I'll tell you about a new feature of [Polygon](http://codecenter.sgu.ru/polygon/) system, which is used to prepare all Codeforces rounds. Of course the system is open to any user – many contests for other competitions and training camps are prepared there. Two key elements of a problem, besides the author's solution, tests and statements, are two programs: the validator and the checker. The validator is the program that reads the test and reports whether it corresponds to the condition of a problem or not. Validators must be absolutely formal – a validator validates a test if and only if it meets the conditions of the problem and can be safely added to the test set. You can easily write validators using the <a href="http://code.google.com/p/testlib">testlib.h</a> library. Sometimes authors neglect validators (which never happens during the Codeforces contests) and it threatens the validity of tests. Since the Codeforces contests contain hacks,...

Full text and comments »

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

45.
By xen, history, 11 years ago, translation, In English
Minijudge — легковесная утилита для тестирования кода **Привет, Codeforces!** Пару месяцев назад я написал небольшую утилиту, которой бы хотел поделиться. Как отмечено в заголовке, она предназначена для быстрого прогона решений на наборе тестов. Возможно (и я в этом даже уверен), что аналоги, умеющие ровно то же или даже больше, уже существуют, но в первую очередь я ставил перед собой цель написать что-нибудь легковесное, кроссплатформенное и, по возможности, легко куда-нибудь интегрируемое. [Сабж (ссылка ведет на Github)](https://github.com/xeeen/minijudge) [cut] &nbsp; **Некое подобие предыстории:** В один прекрасный день, разбирая накопившийся на жестком диске хлам, я наткнулся на архив одного достаточно старого контеста, который, как оказалось, я проглядел и так и не имел шанса написать. Задачи из этого контеста показались мне довольно интересными, поэтому возникла идея найти этот его в разделе тренировок на Codeforces. К сожалению, он там не обнаружился. Так как желание написать контест почему-то было неожиданно ...
designed for use in conjunction with checkers that utilize [testlib ](http://codeforces.me/testlib, for use in conjunction with checkers that utilize [testlib ](http://codeforces.me/testlib), but I, основе [testlib](http://codeforces.me/testlib), но, думаю, любой чекер со сходными параметрами запуска, работоспособна. Скрипт кушает преимущественно чекеры на основе [testlib ](http://codeforces.me/testlib), но

Full text and comments »

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

46.
By jlahcejlot, history, 3 months ago, In English
Mindrift is looking for competitive programmers — get paid to break AI-generated code ### Mindrift is looking for competitive programmers — get paid to break AI-generated code **Who we are:** Mindrift connects specialists with project-based opportunities for leading tech companies, focused on testing, evaluating, and improving AI systems. We're not a product company — we build the training and evaluation data that makes AI models actually good at their job. Right now, we're looking for competitive programmers to help with coding models specifically. We're looking for competitive programmers to help build problems and graders used to train AI coding models. If you enjoy problem-setting, hacking weak solutions, and writing brutal test cases — this might be for you. **What you'd actually do:** - Write original algorithmic problems (statement, constraints, intended solution) - Write correct solutions in C++ and Python - Write realistic wrong solutions — the kind of bugs real contestants actually submit - Build generators, edge cases, stress tests, and testlib...
actually submit - Build generators, edge cases, stress tests, and testlib checkers/interactors, judges), testlib experience, or prior work on LLM code benchmarks/eval datasets., testlib checkers/interactors - Make sure correct solutions pass and wrong ones fail, within time limits

Full text and comments »

  • Vote: I like it
  • -19
  • Vote: I do not like it

47.
By hydroshiba, 5 years ago, In English
Weird sorts #1 — LIS sort I like sorting algorithms very much, and I usually come up with weird ideas for sorting. Sometimes I wonder would those work properly, and now when I finally have the time from social distancing, I decided to start a series on my eccentric ideas &mdash; Weird sorts. As an introductory problem for Dynamic Programming, you all probably know about the Longest Increasing Subsequence problem (LIS). But what if we apply this… to sorting? Today in the first blog of the Weird sorts series, I introduce to you… the LIS sort. #### **Basic idea** The core idea is to extract the LIS from the current array and repeat it until the current array is empty. It can be shown that this process always terminates, because there will always be a LIS that have a size of at least 1, thus at each pass, we will always take at least 1 element away from the array. In the implementation, we will first find the LIS of the array and separate the LIS from the rest of the array. We will then recursively perfo...
([source](https://github.com/MikeMirzayanov/testlib/blob/master/testlib.h)). Execution time was, range $[1, 10^6]$ using the testlib.h library ([source](https://github.com/MikeMirzayanov/testlib/blob

Full text and comments »

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

48.
By rng_58, history, 9 years ago, In English
testlib on cygwin + g++ Does anyone use testlib on cygwin + g++? It gives a compilation error at the 434th line: `_setmode(_fileno(file), O_BINARY);` `` I know two ways to fix this issue: - Comment out the 434th line. However, it disables this line and I'm not sure whether this is a good way. - Add <io.h> to testlib. However, it works only on Windows. How to fix the compilation error in a better way?
testlib on cygwin + g++, - Add to testlib. However, it works only on Windows.

Full text and comments »

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

49.
By langningc2009, history, 15 months ago, In English
CPH-NG: The Next-Generation Competitive Programming Assistant ![CPH-NG Main Interface](https://image.langningchen.com/xyobdtplugtswhjrcsawdbxzfnqqyxwr) _CPH-NG Main Interface &mdash; A Modern Competitive Programming Environment_ > **A VSCode extension optimized for competitive programming, significantly > boosting your efficiency** > > Smart test data management | 21 detailed verdict statuses | Special Judge > support | Automated Compare with Brute Force ## Why Choose CPH-NG? The traditional CPH (Competitive Programming Helper) provides basic support for competitive programming, but still has several pain points in practice: - **Insufficient bulk test data management** – cannot efficiently handle large volumes of test cases - **Limited verdict information** – makes it difficult to pinpoint error types and causes - **No Special Judge (SPJ) support** – cannot handle multiple-solution problems or special judging requirements - **Lack of intelligent compile caching** – repeated compilations waste time - **Rigid config...
![SPJ Config](https://image.langningchen.com/lkwkwlbcxpkdjujcodgoiibihjfwvert) _Full `testlib, `testlib` SPJ | Multi-solution & interactive support | | **Performance monitor** | Basic timing, _Full `testlib` framework support – handling multiple-solution problems_

Full text and comments »

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

50.
By MikeMirzayanov, 16 years ago, In Russian
Чекеры, testlib.h и просто по теме <img src="http://qaconsulting.ru/wp-content/uploads/2010/12/Test_Design_writing.jpg" style="MARGIN: 0.5em 1.0em;WIDTH: 200.0px;FLOAT: right;" /> <h3>Библиотека testlib.h </h3> <p>Здесь пойдет речь о библиотеке testlib.h, которая была написана мной достаточно давно &mdash; году в 2005-ом. Незадолго до этого было объявлено об отказе на финале ACM-ICPC от использования Pascal, популярность набирал TopCoder (где так же нет Pascal/Delphi). Все это приводило к мыслям, что писать чекеры на Pascal вечно невозможно, да и не всегда достаточно удобно, да и кроссплатформенным этот вариант назвать трудно &mdash; по-моему далеко не все testlib.pas (которых несколько разновидностей) компилируются free pascal. </p> <h3>Про чекеры</h3> <p>Так как не все читатели являются авторами задач, то давайте проясним смысл этого слова. Чекером называется программа, которая читает входной файл (тест), вывод проверяемой программы, предполагаемый ответ и выводит вердикт относительно корректности вывода проверяемой ...
* Официальный сайт testlib.h <http://code.google.com/p/<B>testlib</B>/> * , этой причине еще в лохматые 90-е Антоном Сухановым и Романом Елизаровым на был написанtestlib для, testlib для Pascal, который верой и правдой служил на многих NEERC и в модифицированном виде активно

Full text and comments »

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

51.
By dmkozyrev, history, 4 years ago, In Russian
Пытался сделать эвристическую задачу в Polygon, но у меня не получилось... В 2004 году на просторах интернета появилась [игра "Жук"](https://buglab.ru/), [рекламный блог на CF](https://codeforces.me/blog/entry/60387), где необходимо построить лабиринт, который задержит Жука на как можно более длительное время. Сегодня я обновил свой рекорд, построив лабиринт на $93.401.998$ ходов и, заняв 6-е место в топе, решил сделать зеркало этой игры, подготовив задачу на платформе Polygon и добавив в мэшап на codeforces. У меня [это получилось](https://codeforces.me/contestInvitation/a48931d2555c6817996b0cb3c0824107b378777b), можно сабмитить решения и набирать баллы, но получилось не так, как хотелось бы... Буду рад, если кто-нибудь подскажет, как решить возникшие проблемы. [cut] Первое, что не удалось сделать, это огромные сэмплы в условии задачи. В игре поле $21 \times 31$ и при попытке добавить сэмпл с таким полем вылезает ошибка и предложение использовать опцию "examples in statements". Где эта опция находится &mdash; я не нашёл. Гугление тоже не помогло. ...
написал сам, просматривая исходники библиотеки testlib. Это скомпилировалось и должно работать, но, ), поэтому я что-то написал сам, просматривая исходники библиотеки testlib. Это скомпилировалось и должно

Full text and comments »

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

52.
By DeadlyCritic, history, 6 years ago, In English
Suggestion for testlib's random functions In the name of God; Hi, here I want to suggest some random functions for Testlib. Testlib has nice random functions, here I want to suggest some other ones. The first and the second random functions are available in testlib, but the rest are not. 1, $\text{rnd.next(l, r)}$, it will return a random number in range $l$ to $r$ with equal weights : ![ ](/predownloaded/cd/15/cd15ab4574e71207269d7275c6d2b5afbd74c6a1.png) 2, $\text{rnd.wnext(l, r, w)}$, it will return a random number in range $l$ to $r$ with monotonically increasing/decreasing weights depending on $w$ : If $w = 0$ then it will be equal to $\text{rnd.next(l, r)}$. If $w > 0$ : ![ ](/predownloaded/9f/b7/9fb73c8d702f890543927b72d0ace3085a728176.png) If $w < 0$ : ![ ](/predownloaded/b2/da/b2da1470126f46dfa48398b07cde57acd6cf7e0b.png) 3, $\text{rnd.cnext(l, r, c)}$, it will return a random number in range $l$ to $r$ : If $c = 0$ then it will be equal to $\text{rnd.next(l, r)}$ If $c > 0$ : ...
Hi, here I want to suggest some random functions for Testlib., In the name of God; Hi, here I want to suggest some random functions for Testlib .Testlib has, Testlib has nice random functions, here I want to suggest some other ones. The first and the second

Full text and comments »

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

53.
By MikeMirzayanov, 14 years ago, In Russian
Интерактивные задачи: алгоритм тестирования В последнее время формат типичных задач на соревнованиях по программированию расширяется новым видом задач, которые принято называть интерактивными. Решения таких задач в некотором роде общаются (взаимодействуют) с тестирующей оболочкой. Обычно, интерактивные задачи используются для задач двух видов: - Задачи на online-алгоритмы, т.е. такие алгоритмы, которые не читают все входные данные сразу, а могут читать их только по мере своей работы. Простой пример: задано множество из n чисел. Надо обработать n запростов. Каждый запрос содержит элемент множества, до обработки запроса надо вывести минимум чисел в множестве, а потом удалить этот элемент. Естественно, после последнего запроса множества станет пустым. Если решать эту задачу как офлайн-задачу, то можно решать ее <<с конца>>, обрабатывая запросы от последнего к первому (т.е. фактически добавляя в множество элементы). В таком случае решение совсем тривиально. Онлайн-формулировка не позволяет решению прочитать очередной запрос до об...
классические параметры testlib, если интерактор написан на нем. 1. Ждем события, что один из процессов, с ответом (в схеме file.a). Возможны дополнительные классические параметры testlib, если интерактор, По этой причине настоятельно рекомендуется использовать testlib для разработки как чекера, так и

Full text and comments »

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

54.
By agul, 16 years ago, In Russian
Использование Testlib У меня есть своя тестирующая система с открытым исходным кодом. Я немного модифицировал Testlib (переписал создание отчета о тестировании для приведения к формату моей тестирующей системы), добавил комментарий о том, что я добавил изменения, но при этом все копирайты сохранил, стандартный код создания отчета закомментрировал, дописал свой.&nbsp;<div><br></div><div>Могу ли я теперь выложить этот исправленный Testlib на Google Code (где лежит код моей тестирующей системы), не нарушая ни чьи права?</div><div><br></div><div>P.S. Я исправил <b>testlib.pas</b> и <b>testlib.h</b>. Оба файла изначально были взяты в архиве РОИ-2011. Если я не ошибаюсь, то авторы <b>testlib.pas</b> - ИТМО, <b>testlib.h</b> - &nbsp;<span class="Apple-style-span" style="font-family: verdana, arial, sans-serif; font-size: 11px; "><a href="http://codeforces.me/profile/MikeMirzayanov" title="Штаб, MikeMirzayanov" class="rated-user user-admin" style="font-family: arial; text-decoration: none !important; font-weight: b...
Использование Testlib, Могу ли я теперь выложить этот исправленный Testlib на Google Code (где лежит код моей, У меня есть своя тестирующая система с открытым исходным кодом. Я немного модифицировалTestlib

Full text and comments »

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

55.
By freepvps, 12 years ago, In Russian
[C#] — testlib.cs Предыстория ------------------ Не так давно мне потребовалось запустить несколько контестов, да вот беда: пишу я преимущественно на C#, а каждый раз писать уйму кода для генератора тестов, чекера и валидатора под каждую задачу &mdash; идея так себе. У проблемы я видел два решения: писать все на C++ или писать свой testlib. Первый вариант я решил не использовать(хотя и знаю C++), так как не нравится мне идея перепрыгивать на другой язык ради всего-лишь одной библиотеки. Вообщем, было решено изобрести велосипед, но из другого материала. Написано все было за пару вечеров, но в итоге библиотека свою задачу выполняла, а мне этого на тот момент хватало за глаза. Затем хорошие люди меня поддержали меня и порекомендовали опубликовать этот проект на Codeforces. Описание библиотеки ------------------ Библиотеку можно разбить на три раздела: - Delegates - IO - Testing **Delegates** содержит в себе множество, вообщем-то, делегатов, используемых для всяких разных целе...
все на C++ или писать свой testlib. Первый вариант я решил не использовать(хотя и знаю C++), так как, [GitHub](https://github.com/FreePVPs/testlib), У проблемы я видел два решения: писать все на C++ или писать свой testlib. Первый вариант я решил

Full text and comments »

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

56.
By cry, 2 years ago, In English
Polygon Feature Request: Crowdsourcing Generators Hello Codeforcers, especially fellow problemsetters. I'm lazy. I like setting cool problems, but I don't enjoy preparing them. Sometimes, I take longer to prepare a problem than coming up with the idea. Surely I'm not the only one. My laziness has motivated me to make this blog about a feature I think will benefit the future of problemsetting and more frequent contests for codeforces. I propose that there should be a hub for crowdsourcing useful generators from past problems. Similar to a [hub for Minecraft mods](https://www.curseforge.com/minecraft/), I think there should be something similar for testlib generators. Authors of past rounds should be able to upload generators to that hub. They should be able to specify the tags (number theory, brute force, tree) solutions that their generator targets to TLE, and be able to specify what makes their generator special. For example, there can be generators focused on special kinds of trees required to make strong tests for a certain t...
similar for testlib generators. Authors of past rounds should be able to upload generators to that, something similar for testlib generators. Authors of past rounds should be able to upload generators to

Full text and comments »

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

57.
By -739397, history, 7 months ago, In English
Competitive Programming Assistant: all in one bash script Hello Codeforces! I would like to introduce a command-line tool I've been working on to make competitive programming more streamlined and efficient: Competitive-Programming-Assistant (CPA). Natively can install in linux and macOS and can install in windows by WSL. Installation ------------------ **Prerequisites** Before installing, make sure you have the following installed on your system: - g++ and gcc - git and curl - jq (Command-line JSON processor) - nc (netcat, used to listen to Competitive Companion) - Competitive Companion Extension installed in your browser. **Command** ``bash -c "$(curl -fsSL https://raw.githubusercontent.com/sourav739397/Competitive-Programming-Assistant/main/install.sh)"`` Key Features ------------ - Automated Parsing (via Competitive Companion): With a single click in your browser, CPA parses the problem name, time limit, memory limit, and sample tests. It automatically creates the source file and opens it in your editor (defaul...
debugger. - Advanced Output Comparison ([testlib.h](https://codeforces.me/ testlib) Support, - Advanced Output Comparison ([testlib.h](https://codeforces.me/testlib) Support): By default, it

Full text and comments »

  • Vote: I like it
  • -7
  • Vote: I do not like it

58.
By ACM.Mansoura, history, 16 months ago, In English
Game of Coders 4.0 Hello Codeforces! :3 -------------------- This week, [our community in Mansoura](http://facebook.com/ICPC.Mansoura) held its traditional contest Game of Coders for the fourth year. And we are very glad to bring you the contest on Codeforces c: The [mirror contest](https://codeforces.me/gym/106015) will be held on **Saturday 26th** **July 2025 at 11:00 UTC+3**. (Registration is available in the Gym section). You will be given 5 hours to solve 15 problems. The contest is ICPC style with 20 minutes penalty for each incorrect submission, and problems are not sorted by difficulty, so read all the problems carefully. :3 Special Thanks for: - [user:Abdelmohaymn,2025-07-25] , [user:Im70tep,2025-07-25], [user:no-you-didnt,2025-07-25], [user:HALZOOM,2025-07-25] , [user:Gamal74,2025-07-25] , [user:_A3_,2025-07-25] , [user:AhmedReda11,2025-07-25] , [user:ahmed-07,2025-07-25] ,and [user:AdhamElsaady,2025-07-25] for preparing and testing the problems. - [user:MikeMirzayanov,2025...
,2025-07-25] for Codeforces, Polygon, and Testlib. - [ICPC Mansoura Community]((http://facebook.com, - [user:MikeMirzayanov,2025-07-25] for Codeforces, Polygon, and Testlib.

Full text and comments »

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

59.
By MikeMirzayanov, 14 years ago, translation, In English
Серия улучшений января Всем привет! <img src="http://assets.codeforces.com/images/tired.jpg" style="float:right;margin:0 1em 1em 1em;"/> Получилось ли вам провести январь так же продуктивно, как это сделали мы? Вот небольшой список заметных пользователям изменений/нововведений: - Теперь тренерами могут стать не только красные, но и те, кто обладает оранжевым цветом хэндла, участвовал в офиц. соревновании Codeforces не более полугода назад и принял участие не менее чем в 30 рейтинговых соревнованиях Codeforces). Это изменение увеличивает количество потенциальных тренеров примерно вдвое. Так что мы приглашаем вас к участию в тренировках уже в новом статусе! - Добавить контест из Polygon в Тренировки стало совсем просто! Достаточно скопировать данные из contest.xml из интерфейса контеста в системе Polygon в contest.xml в папке sandbox контеста в Тренировках (используйте FTP). - Внедрена защита от потери данных в формах проектов Codeforces и Polygon. Теперь в полях ввода для текста справа сверху появл...
it’s a functional system. - We’ve updated the testlib to 0.8.7: we've boosted the performance of the, updated the testlib to 0.8.7: we've boosted the performance of the ensure() function, the, не закончена, есть свои заморочки, но базово система работает. - Обновлен testlib до 0.8.7, , но базово система работает. - Обновлен testlib до 0.8.7: улучшена производительность функции ensure

Full text and comments »

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

60.
By Eddard, history, 2 years ago, In English
Game of Coders 3.0 Hello Codeforces! :3 Yesterday, our [small community in Mansoura] (https://web.facebook.com/ICPC.Mansoura) held its traditional contest **Game of Coders** for the third year. And we are very glad to bring you the contest on Codeforces c: The [mirror contest] (https://codeforces.me/gym/105262) will be held on Tuesday $16^{\tiny{\mbox{th}}} $ July 2024 at [19:05 UTC+3] (https://www.timeanddate.com/worldclock/fixedtime.html?msg=Game+of+Coders+3.0&iso=20240716T1905&p1=5894&ah=5). You will be given 5 hours to solve 13 problems that I have prepared (I hope they are all original). The contest is ICPC style with 20 minutes penalty for each incorrect submission, and problems are not sorted by difficulty, so read all the problems carefully. :3 This is my first time creating a full problemset, and it was a very fun (and exhausting) experience, and I would like to thank the people who I couldn't have done it without: - [user:TripleM5da,2024-07-14], [user:Hagry,2024-07-14], [user:no...
Codeforces, Polygon, and Testlib. - ICPC Mansoura Community for amazing organization of the event, testing and saving the day. - [user:MikeMirzayanov,2024-07-14] for Codeforces, Polygon, andTestlib

Full text and comments »

Announcement of Game of Coders 3.0
  • Vote: I like it
  • +159
  • Vote: I do not like it

61.
By ifsmirnov, history, 11 years ago, In Russian
Универсальный генератор тестов ­– вброс идей Каждый раз, когда я готовлю контест или просто пишу стресс-тест к задаче, мне приходится писать одни и те же генераторы много раз. Для того, чтобы сгенерировать простое дерево, приходится делать что-то в духе ```` sscanf(argv[1], "%d", &maxn); n = rnd.next(2, maxn); printf("%d\n", n); for (int i = 2; i <= n; ++i) { printf("%d %d\n", rnd.next(1, i-1), i); } ```` Если я хочу пошаффлить рёбра, геморроя чуть больше, если хочу добавить веса, надо добавлять ещё параметр командной строки... С массивами, графами, строками и т.д. не сильно проще. Не сложно, но рутина. testlib, не считая генерации случайных чисел разных типов на интервале, может только генерировать строку по паттерну. А хочется уметь писать как-то так: ```` int maxn, maxc; parseCmdParams(maxn, maxc); cout << Tree().random(1, maxn).addWeight(1, maxc).shuffleEdges(); ```` Соответственно, два вопроса к сообществу. Знаете ли вы что-нибудь подобное, работающее и удобное? И какие у вас самих были бы требован...
рутина. testlib, не считая генерации случайных чисел разных типов на интервале, может только генерировать, строки... С массивами, графами, строками и т.д. не сильно проще. Не сложно, но рутина.testlib, не

Full text and comments »

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

62.
By variety-jones, 5 years ago, In English
CF Stress: A highly customizable no-code tool to stress test CF problems [cfstress.com](https://cfstress.com) **CF Stress** is a highly **customizable**, **no-code** tool to stress test Codeforces problems. You control all the parameters of the generator without writing a single line of code. Feeling lazy and want to pin down the error to an array of length 5? You can do that by adjusting the flags passed to the generator. Feeling adventurous and want to test your logic on test cases of length 1000? There's an option for that too. There's also a builtin diff checker for when you want to compare the output of large test cases. You can also seamlessly copy the input/output to your local machine. Just plug in your submission ID and wait for the ticket to be processed. It also has support for **non-unique** answers and **interactive** problems. The testcases are generated using **testlib**, the framework that's used to create the original test set. **Note**: It only supports **C++** and **Python** submissions for now. (For Java, I could not figur...
generated using **testlib**, the framework that's used to create the original test set., testcases are generated using **testlib**, the framework that's used to create the original test set

Full text and comments »

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

63.
By _Sherbiny, history, 4 months ago, In English
[Gym] Game of Coders 5.0 — Finals Round Hello, Codeforces! We are excited to invite you to participate in [Game of Coders 5.0 | Finals Round](https://codeforces.me/gym/106628) Mirror! Game of Coders is a contest organized by the [**ICPC Mansoura Community**](https://www.facebook.com/ICPC.Mansoura). The original contest is being held in **Mansoura, Egypt**, as preparation for the upcoming **ECPC** competition. The mirror contest will begin on **July 25, 2026 at 10:35 UTC+3**. You will have **5 hours** to solve **15 problems**. The contest follows the ICPC format, and the problems are not sorted by difficulty, so make sure to read the entire problem set carefully! We hope the contest provides useful practice for teams preparing for ECPC, while still being an enjoyable challenge for everyone else. ### Judges and Problem Setters The contest was prepared and judged by: - ~_Sherbiny,2026-07-21 - ~Kareem_Elgoker,2026-07-21 - ~Mugiwaraaa,2026-07-21 ### Special Thanks We would like to thank: - ...
Codeforeces team for Codeforces, Polygon, and Testlib.

Full text and comments »

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

64.
By Nada, 12 years ago, In English
POLYGON TEST CASES GENERATION How to Generate Test Cases Using Polygon ================== ### Step 1: Download [testlib](https://code.google.com/p/testlib/downloads/detail?name=testlib.h) You will have 4 folders and 1 file, one folder is "Generator", it will contain 6 cpp files, each file generates a different kind of input, if you open any file you will know what kind of input it generates. ### Step 2: On polygon, after you finish writing your problem, click on "Files" at the upper bar. at Resource files, click "Add File", select the file "testlib.h" from your hard disk and click "Add". ### Step 3: Then, at Source files, click "Add File", and you should select the suitable cpp file for your problem from the folder "Generators" on your hard disk, and click "Add". **Now you are ready to generate your test cases.** ### Step 4: Select "Tests" from the upper bar, you will find an empty text box written upon it "Script". in this text box you will call your generator with different parameters to g...
### Step 1: Download [testlib](https://code.google.com/p/testlib /downloads/detail?name=testlib.h), How to Generate Test Cases Using Polygon ================== ### Step 1: Download [testlib

Full text and comments »

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

65.
By Mohammed-Shoaib, history, 7 years ago, In English
Question: How do people generate test cases? I was working on a library called [WhatsAlgo](https://github.com/Mohammed-Shoaib/WhatsAlgo) and needed 2 types of functionality: * **generator**: generates a bunch of test cases and creates one or more input files * **validator**: takes the solution file (could be in C++, Python, or other languages) and verifies it on each of the generated input files This got me wondering, how do people generate test cases? I came across 2 popular platforms: * [testlib](https://github.com/MikeMirzayanov/testlib) by [user:MikeMirzayanov,2020-05-31] * [tokilib](https://github.com/fushar/tokilib) by [user:fushar,2020-05-31] Are these the platforms used by the testers on CodeForces? What about other platforms like [AtCoder](https://atcoder.jp/), [HackerRank](https://hackerrank.com/), [LeetCode](https://leetcode.com/), or even [Google](https://codingcompetitions.withgoogle.com/)? I'd appreciate it if someone shed some light on this as it would help me a **lot**. Thank you all for your h...
generate test cases? I came across 2 popular platforms: * [testlib ](https://github.com, * [testlib](https://github.com/MikeMirzayanov/testlib) by [user:MikeMirzayanov,2020-05-31

Full text and comments »

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

66.
By stuwupidwjbu, history, 2 months ago, In English
I made a modern Dev-C++ alternative for competitive programming **UPD 2 (Dec 2026):** we're at v1.5.2 now and the two things you guys kept asking for are finally here :D - **macOS beta** (M1 and later) for [user:FiniteMoves,2026-11-29], [user:testing_now,2026-11-29], [user:-..-,2026-11-29] and [user:LilTimmy,2026-11-29]. You need `brew install gcc` and since Apple wants $99/year to sign an app and I'm broke af you have to allow it by hand the first time and download updates yourself T_T - **Submit from the IDE** (`Ctrl+Alt+S`) for [user:balloon,2026-11-29] and [user:SankVid26,2026-11-29]. Get the extension [on Firefox](https://addons.mozilla.org/firefox/addon/sameko-dev-c-companion/) or load the [extension folder](https://github.com/QuangquyNguyenvo/Sameko-Dev-CPP/tree/main/extension) by hand on Chrome/Edge for now (I'll update here once it's in their stores) and the Submit button shows up once it connects. It's still in beta and I'll try my best to make it stable <img src="/predownloaded/ba/bf/babf5a9d17773978a0cbeec91c7f3d479357d3cd.gif" w...
time and memory (yes MLE too) plus testlib checkers, interactors and file input/output - **Stress, testlib checkers, interactors and file input/output - **Stress test:** give it a generator and a

Full text and comments »

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

67.
By kostka, 11 years ago, In English
Something isn't right Did you notice that in the top navbar something is missing? Old navbar: ![ ](http://codeforces.me/predownloaded/a7/f2/a7f2a1194f9e49ee0dc98b9e3a89318bf3f8492a.png) Current navbar: ![ ](http://codeforces.me/predownloaded/59/04/5904ad01e24038144e2ef2580fb3af2281ac298e.png) I wonder if I miss something about these links being deleted, but I hope they will come back (many questions like [this](http://codeforces.me/blog/entry/44089) can be answered directly by reading [HELP page](http://codeforces.me/help/), am I right?). Moreover: these pages still work. TLDR: Please give back help and testlib to navbar!
help and testlib to navbar!

Full text and comments »

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

68.
By panprog, 5 years ago, In Russian
Как провести муниципальную олимпиаду по информатике на основе Codeforces В нашем регионе с прошлого года решили проводить муниципальный этап всероссийской олимпиады школьников по информатике на базе Codeforces. Я занимался технической подготовкой тестирующей системы. К моему удивлению, несмотря на то, что это официально рекомендуемая система для проведения муниципального этапа, я нигде не нашел нормальной документации по всему процессу. Поэтому публикую этот пост для облегчения жизни тех, кто также захочет организовать любую олимпиаду на базе Codeforces, не обязательно муниципальную. Для муниципальной олимпиады специального процесса нет, она создаётся точно также как любой другой контест. Что нужно до начала олимпиады ============================= Для технической части проведения олимпиады на базе Codeforces понадобится: - Комплект задач &mdash; условия, тесты, программы проверки (т.е. чекеры, если отличаются от стандартных), желательно валидаторы (проверка корректности тестов и их соответствия условию задачи) - Дата, время и продолжит...
проверки. Программа проверки должна использовать стандартный модуль для проверяющих программtestlib

Full text and comments »

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

69.
By hiddentesla, history, 5 years ago, In English
Testlib validator taking unusually long when validating multiple token patterns. Good day codeforces. I am currently preparing a problem where a variable must match one of the ten possible values. Once I finished the validator, I noticed that it validates unusually long, about 18 seconds. Meanwhile, my solution only runs in about 2 seconds on my local machine. After debugging, I found out that the problem is with readToken. I created a simple validator to reproduce the bug: Validator 1: https://ideone.com/1CZiQW Validator 2: https://ideone.com/d91Aan test-case used: https://files.catbox.moe/qb00ce.in (size: 5.2 MB) What both of them do is read an input file where the first variable (cmd) can be one of ten values (QUERY1 &mdash; QUERY10). Their running time differ vastly. Validator1: ~~~~~ time ./a.out < testcase.in real 0m16,480s user 0m16,465s sys 0m0,009s ~~~~~ Validator2: ~~~~~ time ./a.out < testcase.in real 0m1,667s user 0m1,662s sys 0m0,005s ~~~~~ As we can see, Validator2 is almost ten ...
Testlib validator taking unusually long when validating multiple token patterns.

Full text and comments »

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

70.
By Burunduk1, 13 years ago, In Russian
testlib.h проблемы компиляции Доброго времени суток. Сейчас на сборах школьников к межнару нам регулярно приходится делать задачи... естественным образом мы некоторое время потратили на изучение testlib.h, плодами которого я и хочу поделиться =) Такое ощущение, что текущий testlib.0.9.7 (revision 106) 1. Не компилируется под Windows g++ 4.8.1 с -std=c++03 и -std=c++11 (но компилируется с -std=gnu++03 и -std=gnu++11, т.е. с гнусными расширениями стандарта) 2. Никак не компилируется под MacOS g++ (или таки есть правильный набор ключей?) И то, и другое лечится выпиливанием некоторых "не нужных" кусков testlib.h. Подскажите, пожалуйста, это уже где-нибудь обсуждалось? Что планируется с этим делать? Есть еще 3: check.exe input correct-output file-not-found выдает вердикт wrong answer. Это бага или фича? =) P.S. Совет "делайте в полигоне" не принимается, как минимум, у нас часто другой формат задач.
Такое ощущение, что текущий testlib.0.9.7 (revision 106)

Full text and comments »

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

71.
By fushar, 13 years ago, In English
Framework for Generating Test Cases Hi all, I created a framework for generating test cases for competitive programming problems: https://github.com/fushar/tokilib. It extends [user:MikeMirzayanov,2014-03-21]'s [testlib](https://code.google.com/p/testlib/) so that the test cases can be used for systems other than Polygon. We have been using it for IOI training camps in Indonesia and so far we are very satisfied, so we want to share it to you. Any feedback will be appreciated :)
: https://github.com/fushar/tokilib. It extends [user:MikeMirzayanov,2014-03-21]'s [testlib](https, ://github.com/fushar/tokilib. It extends [user:MikeMirzayanov,2014-03-21]'s [ testlib](https

Full text and comments »

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

72.
By dorijanlendvaj, history, 9 years ago, In English
Partial result: 0 points even though I got points in test cases? So, I just made a new interactive task for my mashup contest, submitted an awful solution that should get about 100 points, and I see "Partial result: 0 points". I scroll down to see that I indeed got some points on the test cases. Why is the result 0 points? Video for explanation: [here](https://www.youtube.com/watch?v=HfO7sFFriaE&feature=youtu.be). The links for the codes for the checker and interactor are in the description of that video. Also, is there a way to initialize testlib's RNG with a seed besides something like this? ~~~~~ char **ar=argv; ar[0][0]=seed/256; ar[0][1]=seed%256; registerGen(argc,ar,1); ~~~~~ EDIT: So, apparently testlib automatically puts a random seed to the command line. So, I removed the seed part of the interactor code, but of course the problem still persists.
%256; registerGen(argc,ar,1); ~~~~~ EDIT: So, apparently testlib automatically puts a random seed, EDIT: So, apparently testlib automatically puts a random seed to the command line. So, I removed

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

73.
By vintage_Vlad_Makeev, 13 years ago, In Russian
Странное поведение testlib. Привет всем! Я пишу интерактивную задачу в Полигоне. Программа должна посылать интератору запросы вида "символ число" (через пробел).Для этого я написал следующее в коде интератора char c= ouf.readChar(); int a = ouf.readInt(); И получаю wrong output format Expected integer, but "=" found Потом подумал, что пробел тоже символ и написал так char c= ouf.readChar(); char p=ouf.readChar(); int a = ouf.readInt(); Та же петрушка.В чем дело? Спасибо! **UPD** Если поменять символ и число местами, то прокатывает ~~~~~ int a = ouf.readInt(); ouf.nextChar(); char c= ouf.readChar(); ~~~~~ А вот наоборот- никак(
Странное поведение testlib.

Full text and comments »

74.
By pkhaustov, 14 years ago, In Russian
Проблемсет года 2012 Вот и пролетела вереница новогодних праздников, большинство из нас неохотно возвращаются к трудовым будням. Кроме того, конец новогодних праздников совмещен и с началом последнего этапа голосования "Итоги 2012 года" на сайте проекта SnarkNews. Собственно, об этом событии мне бы и хотелось поговорить в этом посте. Казалось бы, обычное голосование, которое вполне может быть результатом субъективности и чувства юмора участников олимпиадного движения. Но если взглянуть на это голосование под хотя бы сколько-нибудь отличным углом, то в нем можно увидеть неплохую попытку собрать в одном месте все самые значимые события и результаты прошедшего года, выделить людей, которые внесли наиболее значимый вклад в олимпиадное движение. Хотелось бы попросить не относиться пренебрежительно к такого рода голосованию. Если нет желания голосовать объективно &mdash; лучше просто не голосуйте. Год выдался крайне богатым на события: ИТМО стал четырехкратным чемпионом Мира, Евгений Капун стал третьим в и...
детали реализации интерактивных задач. Позже, это вылилось в модификацию библиотекиtestlib и проекта, обсуждение детали реализации интерактивных задач. Позже, это вылилось в модификацию библиотекиtestlib и

Full text and comments »

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

75.
By bluemmb, 12 years ago, In English
Testlib with c++11 Hello. When i try to use testlib with c++11 , arise this error : ~~~~~ In file included from test.cpp:7:0: testlib.h: In function 'void __testlib_set_binary(FILE*)': testlib.h:346:20: error: 'fileno' was not declared in this scope setmode(fileno(file), O_BINARY); ^ ~~~~~ Is compatible version released (couldn't find)? or Problem is removable easily ?
Testlib with c++11, Hello. When i try to use testlib with c++11 , arise this error :

Full text and comments »

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

76.
By CantGetAnyWaWhyIamSoWise, 10 years ago, translation, In English
Hackerrank checker problem I want to manage challange on HACKERRANK (some old COCI, usaco .. -- problems), but I encounter with checker problem. If problem have more than 1 correct answer, how to write checker for that case? Could you show some examples (C++) ? **UPD0** I found that for problems with more than 1 correct answer, we must write checker like for approximation problems. Is it true? Could you show some examples (C++) ? **UPD1** hackerrank.com hasn't got a checker tab like polygon. It has only custom checker, but this checker doesn't use testlib. And this checker for approximation problems. P.S Checker looks like this. I have no idea how to use this. **UPD2** [user:Errichto,2017-01-22] and [user:yeputons,2017-01-22] thank you for your help.
checker doesn't use testlib. And this checker for approximation problems., checker, but this checker doesn't use testlib. And this checker for approximation problems., like polygon. It has only custom checker, but this checker doesn't use testlib . And this checker for

Full text and comments »

77.
By DANDROZAVR, history, 6 years ago, In Russian
Local testlib Hi, Codeforces! Сan anyone advice me how to use testlib locally? I use Code::Blocks IDE with C++ and want to create a checker. No idea how to pass arguments (int argc, char * argv[]) to the main function :)
Local testlib, Hi, Codeforces! Сan anyone advice me how to use testlib locally? I use Code::Blocks IDE with C

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

78.
By IlyaCk, 14 years ago, In Russian
ejudge scoring checker Вступление: ejudge scoring checker &mdash; балл за задачу (или за каждый тест) выставляется проверяющей программой. Чекер может оценивать тест в любое количество баллов от 0 и до максимального балла за данный тест. ( http://ejudge.ru/wiki/index.php/Serve.cfg:problem:scoring_checker ) Суть вопроса: 1) Может ли кто-то выслать/расшарить несекретный рабочий пример такого чекера? Желательно, совместимого с testlib, используемой на Polygon. 2) Возможно ли вообще всё это настроить, если есть ejudge version 2.3.24, и к ней есть доступ через cgi-bin/serve-control но нету доступа к командной строке? Если возможно &mdash; как?
, совместимого с testlib, используемой на Polygon.

Full text and comments »

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

79.
By Nezzar, history, 10 years ago, In English
How to write PC^2 special judge for precision checkings? We are going to organize a competition, but we cannot find any resources that help us to write external validator to check if the output is close enough to the expected answer. Can someone provide us some working validator files or give us some idea on how to work? Any testlib solution will be appreciated.
some working validator files or give us some idea on how to work? Any testlib solution will be, Any testlib solution will be appreciated.

Full text and comments »

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

80.
By zscoder, history, 11 years ago, In English
Writing Codeforces Rounds I have ideas on problems and would like to write a codeforces round, so how should I do so? (I know some basics for writing problems (though I'm not quite familiar with the testlib library).) UPD : I finished all problems and uploaded all of them on polygon, but I still haven't get a reply (my message wasn't even seen yet) :( UPD2 : Got a reply. Thanks to everyone who commented!
some basics for writing problems (though I'm not quite familiar with the testlib library).)

Full text and comments »

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

81.
By Pumkinhead_Me, history, 12 months ago, In English
How to generate distinct numbers with testlib.h? Let's say I have a big range (<= 1e9) from l to r. I need to generate N distinct numbers from this range using testlib. What would be the cleanest way to do that?
range using testlib. What would be the cleanest way to do that?

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

82.
By prsweet, history, 3 weeks ago, In English
zch — test and submit from a terminal dashboard beside Zed Hello Codeforces! I have been working on a small tool for people who use the [Zed](https://zed.dev/) editor: **zch**, a terminal dashboard that works with Competitive Companion. ![zch running a Codeforces problem](https://raw.githubusercontent.com/prsweet/zch/main/docs/demo.gif) **What it does** - Receives problems from Competitive Companion, saves the samples and opens the file in Zed - Runs all samples with one key, showing input, expected and your output side by side, with the differing characters marked, plus time and memory - Checks output like a judge: tokens, lines, case-insensitive, floating-point (epsilon) or your own testlib checker - Runs interactive problems live - Submits to Codeforces from the same screen and shows the verdict It is free and open source (MIT), macOS only for now: https://github.com/prsweet/zch Install with `brew install prsweet/tap/zch` or `cargo install zch`. I would love feedback, bug reports and feature ideas.
-insensitive, floating-point (epsilon) or your own testlib checker - Runs interactive problems live

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

83.
By imad2px, history, 11 years ago, In English
Creating contest problems using Polygon system Hi, I'm new at Codeforces and I just discovered the amazing Polygon system, so I decided to create some contest problems, I need some help about using [testlib](https://code.google.com/p/testlib/) ( how to add validator, how to generate test cases and how to add them manually ), also how to add Model Solution, any help would be appreciated :)
some contest problems, I need some help about using [testlib ](https://code.google.com/p/testlib

Full text and comments »

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

84.
By solomax, 12 years ago, In Russian
Запись тестов из генератора в файлы Я сейчас пытаюсь написать генератор тестов на C++ с использованием библиотеки testlib. Как можно вывести тесты, создаваемые генератором, в файлы?
Я сейчас пытаюсь написать генератор тестов на C++ с использованием библиотеки testlib. Как можно

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

85.
By 028-14683-09-Jan, history, 11 years ago, In Russian
Помогите разобраться с чекером Здравствуйте , в папке есть тесты и ответе на них , check.exe, check.cpp , testlib помогите разобраться как пользоваться ими !!!
Здравствуйте , в папке есть тесты и ответе на них , check.exe, check.cpp , testlib помогите

Full text and comments »

  • Vote: I like it
  • -8
  • Vote: I do not like it