Skip to content

Commit 5421b41

Browse files
committed
Fixes
1 parent 610d1a5 commit 5421b41

File tree

6 files changed

+18
-18
lines changed

6 files changed

+18
-18
lines changed

cp-algo/structures/eertree.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ namespace cp_algo::structures {
6363
print(std::identity{});
6464
}
6565
private:
66-
big_vector<std::forward_list<int>> to;
66+
big_vector<big_forward_list<int>> to;
6767
big_vector<int> len, link, par;
6868
big_string s;
6969
int n = 1, sz = 2, last = 0;

cp-algo/tree/diameter.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ namespace cp_algo::graph {
4343
return s.length + t.length;
4444
} else {
4545
auto collect = [&](up_path v) {
46-
std::basic_string<edge_index> path;
46+
big_basic_string<edge_index> path;
4747
while(v.length) {
4848
edge_index ep = (*parents)[v.start];
4949
path.push_back(ep);

cp-algo/util/big_alloc.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef CP_ALGO_UTIL_big_alloc_HPP
22
#define CP_ALGO_UTIL_big_alloc_HPP
33

4+
#include <set>
45
#include <map>
56
#include <deque>
67
#include <stack>
@@ -10,6 +11,7 @@
1011
#include <cstddef>
1112
#include <iostream>
1213
#include <generator>
14+
#include <forward_list>
1315

1416
// Single macro to detect POSIX platforms (Linux, Unix, macOS)
1517
#if defined(__linux__) || defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
@@ -67,21 +69,18 @@ namespace cp_algo {
6769
}
6870
};
6971

70-
template<typename T>
71-
using big_vector = std::vector<T, big_alloc<T>>;
72-
template<typename T>
73-
using big_basic_string = std::basic_string<T, std::char_traits<T>, big_alloc<T>>;
74-
template<typename T>
75-
using big_deque = std::deque<T, big_alloc<T>>;
72+
template<typename T> using big_vector = std::vector<T, big_alloc<T>>;
73+
template<typename T> using big_basic_string = std::basic_string<T, std::char_traits<T>, big_alloc<T>>;
74+
template<typename T> using big_deque = std::deque<T, big_alloc<T>>;
75+
template<typename T> using big_stack = std::stack<T, big_deque<T>>;
76+
template<typename T> using big_queue = std::queue<T, big_deque<T>>;
77+
template<typename T> using big_priority_queue = std::priority_queue<T, big_vector<T>>;
78+
template<typename T> using big_forward_list = std::forward_list<T, big_alloc<T>>;
79+
using big_string = big_basic_string<char>;
7680
template<typename Key, typename Value, typename Compare = std::less<Key>>
7781
using big_map = std::map<Key, Value, Compare, big_alloc<std::pair<const Key, Value>>>;
78-
using big_string = big_basic_string<char>;
79-
template<typename T>
80-
using big_stack = std::stack<T, big_deque<T>>;
81-
template<typename T>
82-
using big_queue = std::queue<T, big_deque<T>>;
83-
template<typename T>
84-
using big_priority_queue = std::priority_queue<T, big_vector<T>>;
82+
template<typename T, typename Compare = std::less<T>>
83+
using big_multiset = std::multiset<T, Compare, big_alloc<T>>;
8584
template<typename Ref, typename V = void>
8685
using big_generator = std::generator<Ref, V, big_alloc<std::byte>>;
8786
}
@@ -91,4 +90,5 @@ namespace std::ranges {
9190
template<typename Ref, typename V>
9291
elements_of(cp_algo::big_generator<Ref, V>&&) -> elements_of<cp_algo::big_generator<Ref, V>&&, cp_algo::big_alloc<std::byte>>;
9392
}
93+
9494
#endif // CP_ALGO_UTIL_big_alloc_HPP

verify/number_theory/factorize.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using namespace cp_algo::math;
1111
void solve() {
1212
int64_t m;
1313
cin >> m;
14-
auto res = to<vector>(factorize(m));
14+
auto res = to<cp_algo::big_vector<int64_t>>(factorize(m));
1515
ranges::sort(res);
1616
cout << size(res) << " ";
1717
ranges::copy(res, ostream_iterator<int64_t>(cout, " "));

verify/poly/prod_sequence.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void solve() {
1616
int N;
1717
cin >> N;
1818
cp_algo::big_vector<polyn> polys(N);
19-
multiset<polyn, decltype([](polyn const& a, polyn const& b){
19+
cp_algo::big_multiset<polyn, decltype([](polyn const& a, polyn const& b){
2020
return a.deg() < b.deg();
2121
})> que = {polyn(1)};
2222
int D = 0;

verify/string/eertree.test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int yosupo(int v) {
1919
}
2020

2121
void solve() {
22-
string s;
22+
cp_algo::big_string s;
2323
cin >> s;
2424
eertree me(size(s));
2525
cp_algo::big_vector<int> lasts;

0 commit comments

Comments
 (0)