This repo hosts KACTL, KTH's ICPC team reference document. It consists of 25 pages of copy-pasteable C++ code, for use in ICPC-style programming competitions.
See kactl.pdf for the final, browsable version, and content/ for raw source code.
KACTL algorithms should be: useful, short, fast enough, well tested, and if relevant, readable and easy to modify. They should not be overly generic, since code is manually typed and that just adds overhead. Due to space issues, we also exclude algorithms that are very common/simple (e.g., Dijkstra), or very uncommon (general weighted matching).
If you feel that something is missing, could be cleaned up, or notice a bug, please file an issue or send a pull request!
While KACTL is usable as is, it's also easy to modify if you want to create a personalized copy. In particular, you may want to change the cover page, or make your own choice of algorithms to include -- due to space concerns, not all algorithms in the repo are included in the pdf. You may also want to enable colored syntax highlighting.
content/kactl.tex is the main file of KACTL, and can be edited to change team name, logo, syntax highlighting, etc.
It imports chapter.tex files from each of the content/ subdirectories, which define the contents of each chapter.
These include source code, text and math in the form of LaTeX.
To add/remove code from a chapter, add/remove a corresponding \kactlimport line from the chapter.tex file.
For nicer alignment you might want to insert \hardcolumnbreak, \columnbreak or \newpage commands,
though this is usually only done before important contests, and not on the main branch.
The algorithms that are not included in the pdf are left commented out in chapter.tex.
To build KACTL, type make kactl (or make fast) on a *nix machine -- this will update kactl.pdf.
(Windows might work as well, but is not tested.) doc/README has a few more notes about this.
Tips:
- Check out what's excluded by default by running