- PDF: kactl.pdf
- C++ Snippets file for VSCode: cpp.json
- All individual Snippets: snippets.zip
- use only the
#define
s andtypedef
s in the template - run the formatter on any code you commit (
make format
)- you may need to install
clang-format-15
. on Ubuntu, this can be done with
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
- you may need to install
- name files in upper camel case
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
.
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.
check = code written
bold = code written and untested
- contest
- template
- fast IO
-
#define
s andtypedef
s (nowusing
)
- .bashrc
- stupid mistakes
- template
- 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
- FFT
- geometry
- vector
- segment
- circle
- convex hull
- polygon
- rotation/translation?
- clipping?
- other geo stuff