Skip to content

Commit c18dd34

Browse files
committed
even more golf
1 parent 64152af commit c18dd34

File tree

1 file changed

+3
-4
lines changed
  • library/data_structures_[l,r)/bit_uncommon

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@
1414
// NOLINTNEXTLINE(readability-identifier-naming)
1515
template<int K> struct KD_BIT {
1616
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) {
17+
KD_BIT(int n, auto... a): s(n, KD_BIT<K - 1>(a...)) {}
18+
void update(int i, auto... a) {
2019
for (; i < sz(s); i |= i + 1) s[i].update(a...);
2120
}
22-
template<class... A> ll query(int l, int r, A... a) {
21+
ll query(int l, int r, auto... a) {
2322
ll ans = 0;
2423
for (; l < r; r &= r - 1) ans += s[r - 1].query(a...);
2524
for (; r < l; l &= l - 1) ans -= s[l - 1].query(a...);

0 commit comments

Comments
 (0)