cpp-algorithm-snippets
cpp-algorithm-snippets copied to clipboard
♾️ In this repository there is a collection of useful algorithms to use in competitive programming.
[Codeforces Reference: osWAr_s73](https://codeforces.com/contest/1721/submission/169829235)
Reference: [Codeforces by ](https://codeforces.com/contest/1709/submission/165194823) [Franchesco_virgoliniiii](https://codeforces.com/profile/Franchesco_virgoliniiii) ```c++ struct RMQ { vector table; RMQ(vector &v) : table(20, vector(v.size())) { int n = v.size(); for (int i = 0; i < n; i++)...
* [XOR basis without linear algebra](https://codeforces.com/blog/entry/100066) * [A Beautiful Technique for Some XOR Related Problems](https://codeforces.com/blog/entry/68953)
[Tree Diameter](https://cses.fi/problemset/task/1131/)
![1647357564368](https://user-images.githubusercontent.com/22530481/158626352-1a1e6c4a-fc41-4a79-b66e-201f789d89d1.jpg) [Reference - Lautaro Lasorsa](https://www.linkedin.com/feed/update/urn:li:activity:6909518427770490882/)
[Handbook of geometry for competitive programmers](https://victorlecomte.com/cp-geo.pdf) Page: 20
* add usage examples * add string in assets to identify them when errors occur - example `assert(0
[Codeforces reference](https://codeforces.com/contest/710/submission/144111641)