Skip to content

Commit da7b585

Browse files
committed
fix]
1 parent ba2a89f commit da7b585

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

cpp/merge-sort-tree.hpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ class MergeSortTree {
9696
if (b.has_value()) {
9797
int i = std::lower_bound(key_data.begin() + l, key_data.begin() + r, b.value(), comp) - key_data.begin();
9898
if (i != l) {
99-
ret = cumulative_value[i - 1]
99+
ret = cumulative_value[i - 1];
100100
}
101101
} else {
102-
ret = cumulative_value[r - 1]
102+
ret = cumulative_value[r - 1];
103103
}
104104
if (a.has_value()) {
105105
int i = std::lower_bound(key_data.begin() + l, key_data.begin() + r, a.value(), comp) - key_data.begin();
106106
if (i != l) {
107-
ret = op(ret,inv(cumulative_value[i - 1]));
107+
ret = op(ret, inv(cumulative_value[i - 1]));
108108
}
109109
}
110110
return ret;
@@ -164,22 +164,22 @@ class MergeSortTree {
164164
};
165165

166166
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+
};
183183
} // namespace merge_sort_tree
184184
/**
185185
* @tparam S 可換群の型
@@ -192,4 +192,4 @@ using MSTreeSum = MergeSortTree<S, K, std::plus<S>, merge_sort_tree::None<S>, st
192192
* @tparam K ソートに使う型
193193
*/
194194
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

Comments
 (0)