GitHub - ProgramacionCompetitivaUTFSM/Handbook-USM

๐Ÿ“š USM Competitive Programming Handbook

A comprehensive collection of algorithms and data structures for competitive programming, maintained by Universidad Tรฉcnica Federico Santa Marรญa (USM) students.

๐Ÿš€ Quick Start

Prerequisites

  • Typst - A modern markup-based typesetting system

Compilation

This generates a PDF handbook with all algorithms organized by category.

๐Ÿ“– Contents

The handbook includes implementations for:

  • ๐Ÿ”ง General - Templates and troubleshooting guides
  • ๐Ÿ”ค Strings - String processing algorithms (KMP, Z-algorithm, Suffix Array, Trie, etc.)
  • โšก Algorithms - General algorithms (Mo's algorithm, Tortoise-Hare cycle detection)
  • ๐Ÿ“Š Data Structures - Advanced data structures (Segment Trees, Fenwick Trees, Treaps, etc.)
  • ๐Ÿงฎ Mathematics - Number theory, linear algebra, and polynomial operations
  • ๐Ÿ“ˆ Graphs - Graph algorithms (DFS, BFS, Shortest paths, Network flows, etc.)
  • ๐Ÿ“ Geometry - Computational geometry (Convex Hull, Point operations, etc.)
  • ๐ŸŽฏ Dynamic Programming - DP optimizations and classic problems
  • ๐Ÿ”€ Combinatorics - Advanced combinatorial algorithms

๐Ÿ“ Contributing Guidelines

Code Style

  • Naming: Use lowercase with hyphens for folders and files (knuth-morris-pratt โ†’ kmp)
  • File Extensions: Only .cpp and .typ files allowed
  • Indentation: Use exactly 2 spaces (no tabs)
  • Length: Keep filenames under 18 characters when possible
  • Atomicity: Each file should contain only one algorithm/data structure

Code Requirements

  • Documentation: Every C++ file must start with a multi-line comment describing the algorithm
  • No Macros: Avoid competitive programming macros like rep, repx, etc.
  • Clean Code: Write readable, well-structured code

File Structure

content/
โ”œโ”€โ”€ algorithms/            # General algorithms
โ”œโ”€โ”€ combinatorial/         # Combinatorial algorithms
โ”œโ”€โ”€ data-structures/       # Advanced data structures
โ”œโ”€โ”€ dynamic-programming/   # DP techniques
โ”œโ”€โ”€ general/               # Templates and utilities
โ”œโ”€โ”€ geometry/              # Computational geometry
โ”œโ”€โ”€ graphs/                # Graph algorithms
โ”œโ”€โ”€ maths/                 # Mathematical algorithms
โ””โ”€โ”€ strings/               # String algorithms

๐ŸŽฏ Project Goals

  1. Concise Implementations - Provide short, efficient algorithm implementations
  2. Educational Value - Include clear descriptions and explanations
  3. Competitive Ready - Code optimized for programming contests
  4. Comprehensive Coverage - Cover all essential competitive programming topics

๐Ÿšง Roadmap

  • Additional dynamic programming techniques
  • Voronoi diagrams and Delaunay triangulation
  • Extended geometry primitives (lines, circles, 3D operations)
  • 3D Convex Hull algorithms
  • Karatsuba polynomial multiplication
  • Advanced polynomial operations

๐Ÿ‘ฅ Team

Maintainers:

  • Gabriel Carmona (MrYhatoh)
  • Carlos Lagos (CharlesLakes)
  • Sebastiรกn Torrealba (storrealbac)
  • Abner Vidal (abner_vidal)

Contributors:

  • Javier Oliva (JOliva)
  • Marcelo Lemus (MarceloL)

๐Ÿ“„ License

This project is licensed under the terms specified in the LICENSE file.


Built with โค๏ธ for the competitive programming community at USM