We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a11b985 commit 0d5cac9Copy full SHA for 0d5cac9
1 file changed
library/math/matrix_related/xor_basis_ordered.hpp
@@ -2,10 +2,14 @@
2
//! https://codeforces.com/blog/entry/68953
3
//! https://github.com/ssk4988/Hackpack/blob/main/content/numerical/XORBasis.h
4
//! @code
5
-//! basis_ordered<int> b1;
6
-//! basis_ordered<ll> b2;
7
-//! basis_ordered<bitset<lg>> b3;
8
-//! b2.insert(x); // 0 <= x < (1LL<<B)
+//! const int B = 30;
+//! xor_basis<B> b;
+//! bool in_span = b.shrink(x) >= 0;
+//! b.insert(x);
9
+//! bitset<B> k = 5; // 0 <= k < (1 << npivot)
10
+//! bitset<B> kth = b.walk(k);
11
+//! // (k+1)-th smallest vector in span
12
+//! // k=0 gives smallest vector in span
13
//! @endcode
14
//! @time O(q * B^2/32)
15
//! @space O(B^2/32)
0 commit comments