A modular and robust application to create competitive programming templates.
readlink
) that is only available on Linux. WSL should work as well.make
to compile the program. It should produce a binary called gen
. gen
from anywhere, add the directory cp_gen
to your path. Please make sure that gen
is in the root directory of this repo since it requires reading/writing library files to templates.gen $FILENAME
to generate a C++ file. $FILENAME
is required.main.cpp
(feel free to).BEGIN USER CODE
line in the generated file is outputted from user.cpp
in this repo. You can freely modify this file to your liking. Make sure it includes a main function!BEGIN USER CODE
is outputted from ./lib/$DS.hpp
where you can specify which $DS
s you want to be included.gen X.cpp -dsu
will include the Disjoint Set Union data structure and generate a file called X.cpp
in the current working directory.gen ..\above.cpp
will generate a file called above.cpp
in the directory above the current working directory.gen A.cpp -segtree -num
will include everything from ./lib/segtree.hpp
and ./lib/num.hpp
into A.cpp
.gen my_program.cpp -num
will include everything from ./lib/num.hpp
in my_program.cpp
.make tests
../tests/README.md
.