We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8135aed commit 2ce8903Copy full SHA for 2ce8903
library/data_structures_[l,r)/bit_uncommon/kd_bit.hpp
@@ -12,12 +12,6 @@
12
//! @time O(n^k + q * log^k n)
13
//! @space O(n^k)
14
// NOLINTNEXTLINE(readability-identifier-naming)
15
-template<int K> struct KD_BIT;
16
-template<> struct KD_BIT<0> {
17
- ll s = 0;
18
- void update(ll v) { s += v; }
19
- ll query() { return s; }
20
-};
21
template<int K> struct KD_BIT {
22
vector<KD_BIT<K - 1>> s;
23
template<class... A>
@@ -32,3 +26,8 @@ template<int K> struct KD_BIT {
32
26
return ans;
33
27
}
34
28
};
29
+template<> struct KD_BIT<0> {
30
+ ll s = 0;
31
+ void update(ll v) { s += v; }
+ ll query() { return s; }
+};
0 commit comments