My Template for Competitive Programming. Some Ideas are borrowed from https://github.com/Errichto/youtube/tree/master/testing.
source init.sh
- Implement your solution in main.cpp.
- Add your input to input.txt.
- Use
ks-fast
to build a fast version of your program. - (Optional) Use
ks-slow
to build a slow version of your program with more debug information to help you debug. - Use
ks-run
to test your program with the input.
- Implement your input data generator in test/src/step0-gen.cpp.
- Implement your slow (but absolutely correct) algorithm in test/src/step1-slow.cpp.
- Implement your fast (but incorrect) algorithm in test/src/step2-fast.cpp.
- Use
ks-test-build
to build the above 3 programs. - Use
ks-test-run
to compare the output of fast program and slow program.
Whenever you solved an algorithm problem and before you turn to another problem, you can enter:
$ git reset --hard
$ git clean -dfx
to reset the template.