-
Notifications
You must be signed in to change notification settings - Fork 1
Home
afaji edited this page Mar 15, 2017
·
6 revisions
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.
just clone/download this repository, and use -I PATH/tcrand/include
when compiling the c++ code.
You can easily integrate this with tcframe. See [this example] (https://github.com/afaji/tcrand/blob/fushar/example-tree/examples/tree/spec.cpp).