Skip to content
afaji edited this page Mar 15, 2017 · 6 revisions

What is tcrand?

tcrand is a tool to randomly generate competitive programming's test cases. tcrand can randomly generate common data structures such as graphs, trees, or strings, as simple as:

TreeRandomizer tree_rand; //prepare the object
tree_rand.depth(50).nodes(1000); //define your constraint
Tree t = tree_rand.next(); //randomize!

tcrand is built mainly to integrate with tcframe, although you can use tcrand independently. Furthermore, while this tool is designed for competitive programming field, you may use this as general random data generation.

How to Install

just clone/download this repository, and use -I PATH/tcrand/include when compiling the c++ code.

Integration with tcframe

You can easily integrate this with tcframe. See [this example] (https://github.com/afaji/tcrand/blob/fushar/example-tree/examples/tree/spec.cpp).

Clone this wiki locally