|
16 | 16 | #include <boost/bind.hpp> |
17 | 17 | #include <boost/unordered_map.hpp> |
18 | 18 | #include <boost/range/algorithm_ext.hpp> |
| 19 | +#include <boost/range/algorithm/transform.hpp> |
19 | 20 | #include <boost/range/adaptor/reversed.hpp> |
| 21 | +#include <deque> |
| 22 | +#include <algorithm> |
| 23 | +#include <iterator> |
20 | 24 |
|
21 | 25 | using namespace boost; |
22 | 26 |
|
23 | 27 | std::size_t lowest_common_ancestor(std::size_t N, std::size_t u, std::size_t w) |
24 | 28 | { |
25 | | - const std::size_t size = std::max(u, w) + 1; |
| 29 | + const std::size_t size = std::max<std::size_t>(u, w) + 1; |
26 | 30 | std::vector<bool> ancester_of_u(size, false), ancester_of_w(size, false); |
27 | 31 | while (u > 0 || w > 0) |
28 | 32 | { |
@@ -140,10 +144,7 @@ BOOST_AUTO_TEST_CASE(link_cut_trees_test3) |
140 | 144 | std::vector<std::string> elements; |
141 | 145 | std::vector<int> numbers(100); |
142 | 146 | boost::range::iota(numbers, -49); |
143 | | - std::transform(numbers.begin(), |
144 | | - numbers.end(), |
145 | | - std::back_inserter(elements), |
146 | | - boost::bind(lexical_cast<std::string, int>, _1)); |
| 147 | + boost::range::transform(numbers, std::back_inserter(elements), boost::bind(lexical_cast<std::string, int>, _1)); |
147 | 148 | link_cut_trees_t lct; |
148 | 149 | test_link_cut_trees<link_cut_trees_t, std::string>(lct, elements); |
149 | 150 | } |
|
0 commit comments