mraggi / ContestLibrary

A collection of useful algorithms to use in contests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Coverage Status license

Algorithms for Contests

A collection of useful algorithms to use in contests such as the ACM ICPC, hackerrank, etc.

See the printable booklet.

Run ./build_book.sh to build the book after modifying a source file. Note that some processing takes place, such a removing the "inline" keyword from .hpp files, as it is not needed in contests, where a single cpp file is submitted.

Requires:

  • pandoc
  • clang and clang-format
  • fd
  • latex
  • ?

TODO:

Already programmed, needs cleanup, etc.

  • Geometry: Points, lines, segments, convex hulls, etc.
  • Sequences: binomial, stirling numbers, etc.
  • Lagrange Interpolation
  • Polynomials, maybe fourier transforms
  • Simple matrices
  • Splay trees ("ropes")
  • String stuff: Suffix trees, etc.

Not yet programmed:

  • Segment Trees
  • Fenwick Trees
  • KD trees
  • ???

Thanks to:

  • All my students
  • ENES Morelia
  • Dr. Jaehyun Park, for releasing his code (for simplex and max flow) with MIT License

Contributing

We welcome contributions! We value clean, modern C++ Object Oriented code, so don't use C-style code, macros, etc. Don't worry about formatting (use whatever style you like), since we use clang-format and clang-tidy before commiting anything.

About

A collection of useful algorithms to use in contests.

License:MIT License


Languages

Language:C++ 88.9%Language:CMake 7.6%Language:Shell 1.5%Language:Python 1.1%Language:TeX 0.8%