@@ -96,15 +96,15 @@ class MergeSortTree {
96
96
if (b.has_value ()) {
97
97
int i = std::lower_bound (key_data.begin () + l, key_data.begin () + r, b.value (), comp) - key_data.begin ();
98
98
if (i != l) {
99
- ret = cumulative_value[i - 1 ]
99
+ ret = cumulative_value[i - 1 ];
100
100
}
101
101
} else {
102
- ret = cumulative_value[r - 1 ]
102
+ ret = cumulative_value[r - 1 ];
103
103
}
104
104
if (a.has_value ()) {
105
105
int i = std::lower_bound (key_data.begin () + l, key_data.begin () + r, a.value (), comp) - key_data.begin ();
106
106
if (i != l) {
107
- ret = op (ret,inv (cumulative_value[i - 1 ]));
107
+ ret = op (ret, inv (cumulative_value[i - 1 ]));
108
108
}
109
109
}
110
110
return ret;
@@ -164,22 +164,22 @@ class MergeSortTree {
164
164
};
165
165
166
166
namespace merge_sort_tree {
167
- template <typename S>
168
- struct Zero {
169
- S operator ()() const { return S (0 ); }
170
- };
171
- template <typename S>
172
- struct One {
173
- S operator ()() const { return S (1 ); }
174
- };
175
- template <typename S>
176
- struct None {
177
- S operator ()() const { return S{}; }
178
- };
179
- template <typename S>
180
- struct Inv {
181
- S operator ()(const S& a) const { return S (1 ) / a; }
182
- };
167
+ template <typename S>
168
+ struct Zero {
169
+ S operator ()() const { return S (0 ); }
170
+ };
171
+ template <typename S>
172
+ struct One {
173
+ S operator ()() const { return S (1 ); }
174
+ };
175
+ template <typename S>
176
+ struct None {
177
+ S operator ()() const { return S{}; }
178
+ };
179
+ template <typename S>
180
+ struct Inv {
181
+ S operator ()(const S& a) const { return S (1 ) / a; }
182
+ };
183
183
} // namespace merge_sort_tree
184
184
/* *
185
185
* @tparam S 可換群の型
@@ -192,4 +192,4 @@ using MSTreeSum = MergeSortTree<S, K, std::plus<S>, merge_sort_tree::None<S>, st
192
192
* @tparam K ソートに使う型
193
193
*/
194
194
template <typename S, typename K>
195
- using MSTreeProd = MergeSortTree<S, K, std::multiplies<S>, merge_sort_tree::One<S>, std ::Inv<S>, std::less<K>>;
195
+ using MSTreeProd = MergeSortTree<S, K, std::multiplies<S>, merge_sort_tree::One<S>, merge_sort_tree ::Inv<S>, std::less<K>>;
0 commit comments