We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64152af commit c18dd34Copy full SHA for c18dd34
library/data_structures_[l,r)/bit_uncommon/kd_bit.hpp
@@ -14,12 +14,11 @@
14
// NOLINTNEXTLINE(readability-identifier-naming)
15
template<int K> struct KD_BIT {
16
vector<KD_BIT<K - 1>> s;
17
- template<class... A>
18
- KD_BIT(int n, A... a): s(n, KD_BIT<K - 1>(a...)) {}
19
- template<class... A> void update(int i, A... a) {
+ KD_BIT(int n, auto... a): s(n, KD_BIT<K - 1>(a...)) {}
+ void update(int i, auto... a) {
20
for (; i < sz(s); i |= i + 1) s[i].update(a...);
21
}
22
- template<class... A> ll query(int l, int r, A... a) {
+ ll query(int l, int r, auto... a) {
23
ll ans = 0;
24
for (; l < r; r &= r - 1) ans += s[r - 1].query(a...);
25
for (; r < l; l &= l - 1) ans -= s[l - 1].query(a...);
0 commit comments