kth-competitive-programming / Kactl

KTH Algorithm Competition Template Library (... eller KTHs AC-tillverkande lapp)

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Kactl

Data Structures And Algorithms
A collection of some implementations of data structures and algorithms.
Stars: ✭ 101 (-90.87%)
Mutual labels:  competitive-programming, algorithm, data-structures
Data structure and algorithms library
A collection of classical algorithms and data-structures implementation in C++ for coding interview and competitive programming
Stars: ✭ 133 (-87.97%)
Mutual labels:  competitive-programming, algorithm, data-structures
Competitive Programming
My solutions to problems from various competitive programming websites.
Stars: ✭ 93 (-91.59%)
Mutual labels:  competitive-programming, algorithm, data-structures
Arabiccompetitiveprogramming
The repository contains the ENGLISH description files attached to the video series in my ARABIC algorithms channel.
Stars: ✭ 675 (-38.97%)
Mutual labels:  competitive-programming, algorithm, data-structures
Algorithms
My Algorithms and Data Structures studies. https://leandrotk.github.io/series/algorithms-problem-solving
Stars: ✭ 275 (-75.14%)
Mutual labels:  competitive-programming, algorithm, data-structures
Advanced Data Structures With Python
Python implementations of Advanced Data Structures and Algorithms. With each code, there is an associated markdown for explanation and applications of that algorithm or data structure.
Stars: ✭ 82 (-92.59%)
Mutual labels:  competitive-programming, algorithm, data-structures
Hackerrank
📗 Solutions of more than 380 problems of Hackerrank accross several domains.
Stars: ✭ 128 (-88.43%)
Mutual labels:  competitive-programming, algorithm, data-structures
Get better at cp in 2 months
This contains the curriculum that I will follow to get better at Competitive Programming in 2 months.
Stars: ✭ 627 (-43.31%)
Mutual labels:  competitive-programming, algorithm, data-structures
Dailycodebase
2 month data structures and algorithmic scripting challenge starting from 20th December 2018 - Coding is Fun! 💯💯 Do it everyday!! Also, Do give us a ⭐ if you liked the repository
Stars: ✭ 186 (-83.18%)
Mutual labels:  competitive-programming, algorithm, data-structures
Library Checker Problems
The problem data (Test case generator, judge's solution, task, ...) of Library Checker
Stars: ✭ 183 (-83.45%)
Mutual labels:  competitive-programming, algorithm, data-structures
Competitive Programming
VastoLorde95's solutions to 2000+ competitive programming problems from various online judges
Stars: ✭ 147 (-86.71%)
Mutual labels:  competitive-programming, algorithm, data-structures
Competitiveprogramming
A collection of algorithms, data structures and other useful information for competitive programming.
Stars: ✭ 475 (-57.05%)
Mutual labels:  competitive-programming, data-structures, notebook
Competitive coding
This repository contains some useful codes, techniques, algorithms and problem solutions helpful in Competitive Coding.
Stars: ✭ 393 (-64.47%)
Mutual labels:  competitive-programming, algorithm, data-structures
Algorithms
Solved algorithms and data structures problems in many languages
Stars: ✭ 1,021 (-7.69%)
Mutual labels:  competitive-programming, algorithm, data-structures
Dsa.js Data Structures Algorithms Javascript
🥞Data Structures and Algorithms explained and implemented in JavaScript + eBook
Stars: ✭ 6,251 (+465.19%)
Mutual labels:  algorithm, data-structures
Light Tips
Some code tips about algorithms, php and more 🔥
Stars: ✭ 705 (-36.26%)
Mutual labels:  algorithm, data-structures
Algorithms
Data Structure Libraries and Algorithms implementation
Stars: ✭ 624 (-43.58%)
Mutual labels:  algorithm, data-structures
Tech Refrigerator
🍰 기술 냉장고입니다. 🛒 기술 면접 , 전공 시험 , 지식 함양 등 분명 도움될 거예요! 🤟
Stars: ✭ 699 (-36.8%)
Mutual labels:  algorithm, data-structures
Algorithm
Algorithm is a library of tools that is used to create intelligent applications.
Stars: ✭ 787 (-28.84%)
Mutual labels:  algorithm, data-structures
Competitive Programming Library
A library designed to improve your competitive programming performance.
Stars: ✭ 26 (-97.65%)
Mutual labels:  competitive-programming, data-structures

KACTL

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.

Aspirations

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!

Customizing KACTL

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 master. 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:

  1. Check out what's excluded by default by running make showexcluded. The default configuration is chosen to be a reasonable balance for beginners and advanced teams.
  2. Take advantage of the hashing when typing in these algorithms. Each algorithm has a 6 character MD5 hash in the upper right. This hash can be generated by using hash.sh or the :Hash command from the .vimrc. The hashing ignores whitespace and comments.

Coding style

KACTL uses a relatively terse coding style, with a handful of macros/typedefs defined in the template that help shorten the code. Line width is 63 chars, with tabs for indentation (tab = 2 spaces in the pdf).

Each algorithm contains a header with the author of the code, the date it was added, a description of the algorithm, its testing status, and preferably also source, license and time complexity.

kactl.pdf is to be kept to 25 pages + cover page. Occasionally the generated kactl.pdf is committed to the repo for convenience, but not too often because it makes git operations slower.

Testing

KACTL aims for a high level of confidence in algorithm correctness. Testing is done both on online judges and (for newer algorithms) with stress tests that compare output to a more naive algorithm for a large amount of randomly generated cases. These 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 a whitelist in docs/scripts/skip_headers) and that the latex compiles.

old-unit-tests contains a couple of broken unit tests, last touched about ten years ago.

License

As usual for competitive programming, the licensing situation is a bit unclear. Many source files are marked with license (we try to go with CC0), but many also aren't. Presumably 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. To help trace things back, sources and authors are noted in source files.

Everything in stress-tests is implicitly CC0, except reference implementations taken from around the Internet.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].