PyRival icon indicating copy to clipboard operation
PyRival copied to clipboard

⚡ Competitive Programming Library

Results 15 PyRival issues
Sort by recently updated
recently updated
newest added

If a and b both have size 1 then ntt will have a runtime error (or (0,2), (2,0) but I don't know if this case comes up). I'm not sure...

The old method names were better as they directly copied sortedcontainers. Using multiset method names is annoying.

I wrote some number theory functions here (not optimized) at https://github.com/jxu/PyPE/blob/master/src/number.py

One of the most common codes that I've looked up over time is a mod template that I wrote many years ago for a private repository. It is useful enough...

Python has a problem with being slow when it comes to having tuples inside of a heap. There have been multiple problems on codeforces.com with currently no accepted python heap...

Xor basis is an useful technique to solve many complex problems in Competitive Programming involving bitwise xors. This pull request adds code for xor basis.

Code is based on, translated from c++: [https://github.com/kth-competitive-programming/kactl/blob/7942c791ba8055668f8becd91ea2c1bb8777a796/content/numerical/Simplex.h](url)

**Describe the bug** Copied LazySegmentTree.py template to solve this problem, but when submitting gave Runtime Error On Test 5 https://codeforces.com/contest/1549/submission/186542539 After debugging, realised that size of self._lazy and self._data is...

**Describe the bug** If a node appears several times on the stack, then it will be processed several times in the `else` branch. https://github.com/cheran-senthil/PyRival/blob/master/pyrival/graphs/dfs.py **Expected behaviour** I would expect the...

Push relabel is known to be much faster than Dinic and necessary for solving some flow problems with tighter time constraints. Here I translated Kactl's c++ version to python. This...