Skip to content

Commit 2ce8903

Browse files
authored
Update kd_bit.hpp
1 parent 8135aed commit 2ce8903

File tree

1 file changed

+5
-6
lines changed
  • library/data_structures_[l,r)/bit_uncommon

1 file changed

+5
-6
lines changed

library/data_structures_[l,r)/bit_uncommon/kd_bit.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212
//! @time O(n^k + q * log^k n)
1313
//! @space O(n^k)
1414
// 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-
};
2115
template<int K> struct KD_BIT {
2216
vector<KD_BIT<K - 1>> s;
2317
template<class... A>
@@ -32,3 +26,8 @@ template<int K> struct KD_BIT {
3226
return ans;
3327
}
3428
};
29+
template<> struct KD_BIT<0> {
30+
ll s = 0;
31+
void update(ll v) { s += v; }
32+
ll query() { return s; }
33+
};

0 commit comments

Comments
 (0)