lrvideckis / hackpack-cpp

C++ Reference Code for Competitive Programming

Home Page:http://www.ucfprogrammingteam.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UCF PT C++ Hackpack

Style

  • use only the #defines and typedefs in the template
  • run the formatter on any code you commit (make format)
    wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
    source /etc/os-release
    sudo add-apt-repository "deb http://apt.llvm.org/$UBUNTU_CODENAME/ llvm-toolchain-$UBUNTU_CODENAME-15 main"
    sudo apt-get update
    sudo apt-get install clang-format-15
  • name files in upper camel case

Building PDF

The three dependencies for making the PDF are LaTeX, Python, and Make. To build the hackpack PDF, go to the base directory and run make kactl.

Snippets

snippet

To use the snippets:

  • Download cpp.json
  • Find the C++ snippet file in VSCode (File->Preferences->User Snippets->cpp.json)
  • Copy and paste the cpp.json file into VSCode

To make/update the snippets, you just need to run make snippets, and it will assemble all of the snippets for you in snippets/cpp.json or snippets/java.json.

VSCode's soft tabs should match whatever style of tabs you're using. So, if you were using 2 spaces, all of the code that gets imported via snippet should also be in 2 spaces.

Contents/To-do

check = code written

bold = code written and untested

  • contest
    • template
      • fast IO
      • #defines and typedefs (now using)
    • .bashrc
    • stupid mistakes
  • misc
    • atharva's K-D vector thing (does this need to be tested?)
    • hash set
      • other useful stuff from PBDS and how to use them
    • submasks in 3^n (does this need to be tested?)
  • structures
    • BIT
    • benq's K-D BIT???
    • treap
      • implicit
      • explicit
    • splay tree
      • implicit
      • explicit
    • link cut tree
    • segment tree
      • seg tree beats
      • other wacky seg trees
    • DSU
    • min queue
    • min stack
    • RMQ (generic comparator)
    • wavelet tree
    • dominator tree (???)
  • strings
    • aho corasick
    • eertree
    • hashing stuff
      • rolling hash
      • prefix hash stuff
      • codeforces proof stuff
    • KMP
    • manacher's (gross)
    • z values
    • suffix array
  • graph
    • binary lifting
    • HLD
    • centroid decomp
    • 2CC (BCC)
      • bridges and art. points
    • SCC
      • tarjan
      • kosaraju (easy to type)
    • 2SAT
    • dijkstra
    • bellman ford
    • floyd warshall
    • flow
      • dinic
      • MCMF
      • hungarian
  • math
    • FFT
      • NTT with same code but also fast???
    • CRT
    • totient
    • prime sieve
      • linear sieve? segmented sieve
    • fractions
      • fraction struct
      • fraction compare (in fraction struct)
      • fraction binary search
    • euclidean algo (GCD)
      • non prime mod inverse
    • pollard rho
    • primality testing
      • fermat
      • miller rabin (deterministic bases for longs)
    • primitive root
    • gaussian
    • big int???
      • atharva's code is wicked long
  • geometry
    • vector
    • segment
    • circle
    • convex hull
    • polygon
      • rotation/translation?
      • clipping?
    • other geo stuff

About

C++ Reference Code for Competitive Programming

http://www.ucfprogrammingteam.org/


Languages

Language:C++ 36.3%Language:C 33.6%Language:Java 16.3%Language:TeX 9.5%Language:Python 3.7%Language:Makefile 0.6%Language:Shell 0.0%