{"id":13480404,"url":"https://github.com/kth-competitive-programming/kactl","last_synced_at":"2025-05-13T22:05:22.947Z","repository":{"id":37276250,"uuid":"92687870","full_name":"kth-competitive-programming/kactl","owner":"kth-competitive-programming","description":"KTH Algorithm Competition Template Library (... eller KTHs AC-tillverkande lapp)","archived":false,"fork":false,"pushed_at":"2025-01-31T23:11:55.000Z","size":13926,"stargazers_count":2905,"open_issues_count":67,"forks_count":802,"subscribers_count":46,"default_branch":"main","last_synced_at":"2025-05-12T11:52:20.024Z","etag":null,"topics":["algorithm","cc0","competitive-programming","contest","cpp","data-structures","notebook"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kth-competitive-programming.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-28T21:22:20.000Z","updated_at":"2025-05-12T09:42:24.000Z","dependencies_parsed_at":"2023-01-21T10:31:24.383Z","dependency_job_id":"ec4f5907-5a16-482e-8e6a-8bb3d3d86c6b","html_url":"https://github.com/kth-competitive-programming/kactl","commit_stats":{"total_commits":946,"total_committers":38,"mean_commits":"24.894736842105264","dds":"0.39640591966173366","last_synced_commit":"dccc967e101ff0660c4cd41426c6a7b132d0256c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kth-competitive-programming%2Fkactl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kth-competitive-programming%2Fkactl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kth-competitive-programming%2Fkactl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kth-competitive-programming%2Fkactl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kth-competitive-programming","download_url":"https://codeload.github.com/kth-competitive-programming/kactl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254036817,"owners_count":22003653,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","cc0","competitive-programming","contest","cpp","data-structures","notebook"],"created_at":"2024-07-31T17:00:38.787Z","updated_at":"2025-05-13T22:05:17.915Z","avatar_url":"https://github.com/kth-competitive-programming.png","language":"C++","readme":"# KACTL\n\nThis repo hosts KACTL, [KTH](https://en.wikipedia.org/wiki/KTH_Royal_Institute_of_Technology)'s ICPC team reference document.\nIt consists of 25 pages of copy-pasteable C++ code, for use in ICPC-style programming competitions.\n\nSee [kactl.pdf](./kactl.pdf) for the final, browsable version, and [content/](./content/) for raw source code.\n\n## Aspirations\n\nKACTL algorithms should be: useful, short, fast enough, well tested, and if relevant, readable and easy to modify.\nThey should *not* be overly generic, since code is manually typed and that just adds overhead.\nDue to space issues, we also exclude algorithms that are very common/simple (e.g., Dijkstra), or very uncommon (general weighted matching).\n\nIf you feel that something is missing, could be cleaned up, or notice a bug, please file an issue or [send a pull request](https://help.github.com/articles/fork-a-repo/)!\n\n## Customizing KACTL\n\nWhile KACTL is usable as is, it's also easy to modify if you want to create a personalized copy.\nIn particular, you may want to change the cover page, or make your own choice of algorithms to include --\ndue to space concerns, not all algorithms in the repo are included in the pdf.\nYou may also want to enable colored syntax highlighting.\n\n`content/kactl.tex` is the main file of KACTL, and can be edited to change team name, logo, syntax highlighting, etc.\nIt imports `chapter.tex` files from each of the `content/` subdirectories, which define the contents of each chapter.\nThese include source code, text and math in the form of LaTeX.\nTo add/remove code from a chapter, add/remove a corresponding `\\kactlimport` line from the `chapter.tex` file.\nFor nicer alignment you might want to insert `\\hardcolumnbreak`, `\\columnbreak` or `\\newpage` commands,\nthough this is usually only done before important contests, and not on the main branch.\nThe algorithms that are not included in the pdf are left commented out in `chapter.tex`.\n\nTo build KACTL, type `make kactl` (or `make fast`) on a \\*nix machine -- this will update `kactl.pdf`.\n(Windows might work as well, but is not tested.) `doc/README` has a few more notes about this.\n\nTips:\n1. Check out what's excluded by default by running `make showexcluded`.\nThe default configuration is chosen to be a reasonable balance for beginners\nand advanced teams.\n2. Take advantage of the hashing when typing in these algorithms. Each\nalgorithm has a 6 character MD5 hash in the upper right. This hash can be\ngenerated by using `hash.sh` or the `:Hash` command from the `.vimrc`. The\nhashing ignores whitespace and comments.\n\n## Coding style\n\nKACTL uses a relatively terse coding style, with a handful of macros/typedefs defined in the\n[template](./content/contest/template.cpp) that help shorten the code.\nLine width is 63 chars, with tabs for indentation (tab = 2 spaces in the pdf).\n\nEach algorithm contains a header with the author of the code, the date it\nwas added, a description of the algorithm, its testing status, and preferably also\nsource, license and time complexity.\n\nkactl.pdf is to be kept to 25 pages + cover page.\nOccasionally the generated kactl.pdf is committed to the repo for convenience, but not too often because it makes git operations slower.\n\n## Testing\n\nKACTL aims for a high level of confidence in algorithm correctness.\nTesting is done both on online judges and (for newer algorithms) with stress tests\nthat compare output to a more naive algorithm for a large amount of randomly generated cases.\nThese tests live in the `stress-tests` directory, and are run with CI on every commit. The CI also verifies that all headers compile (except for an exclude list in `docs/scripts/skip_headers`) and that the latex compiles.\n\n`old-unit-tests` contains a couple of broken unit tests, last touched about ten years ago.\n\n## License\n\nAs usual for competitive programming, the licensing situation is a bit unclear.\nMany source files are marked with license (we try to go with\n[CC0](https://creativecommons.org/share-your-work/public-domain/cc0/)), but many also aren't.\nPresumably good will is to be assumed from other authors, though, and in many cases permission should not be needed since the code is not distributed.\nTo help trace things back, sources and authors are noted in source files.\n\nEverything in `stress-tests` is implicitly CC0, except reference implementations taken from around the Internet.\n","funding_links":[],"categories":["C++","Implementations"],"sub_categories":["Camps and Trainings"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth-competitive-programming%2Fkactl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkth-competitive-programming%2Fkactl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkth-competitive-programming%2Fkactl/lists"}