fish.cpp: In member function 'void SegmentTree::init()':
fish.cpp:11:16: error: 'seg' was not declared in this scope
11 | memset(seg, 0xcf, sizeof(tree));
| ^~~
fish.cpp: In member function 'void SegmentTree::up(int, int, int, int, int, ll)':
fish.cpp:20:9: error: 'update' was not declared in this scope
20 | update(2 * idx, s, mid, l, r, val);
| ^~~~~~
fish.cpp: In member function 'll SegmentTree::qry(int, int, int, int)':
fish.cpp:24:33: error: 'i' was not declared in this scope
24 | if (s == e) return tree[i];
| ^
fish.cpp:27:39: error: 'i' was not declared in this scope
27 | return max(tree[idx], qry(2 * i + 1, mid + 1, e, x));
| ^
fish.cpp: In function 'll max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)':
fish.cpp:32:74: error: no matching function for call to 'std::vector<std::pair<int, int> >::push_back(__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type, __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type&)'
32 | for (int i = 0; i < M; i++) fishes[X[i] + 1].push_back(Y[i] + 1, W[i]);
| ^
In file included from /usr/include/c++/10/vector:67,
from fish.h:1,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1187 | push_back(const value_type& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1187:7: note: candidate expects 1 argument, 2 provided
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate: 'void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]'
1203 | push_back(value_type&& __x)
| ^~~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:1203:7: note: candidate expects 1 argument, 2 provided
fish.cpp:35:26: error: 'n' was not declared in this scope
35 | for (int i = 1; i <= n; i++) {
| ^
fish.cpp:37:46: error: 'struct SegmentTree' has no member named 'upd'; did you mean 'up'?
37 | for (auto [j, w] : fishes[i]) st_up.upd(1, 0, N + 1, j + 1, N + 1, st_up.qry(1, 0, N + 1, j) + val);
| ^~~
| up
fish.cpp:37:105: error: 'val' was not declared in this scope
37 | for (auto [j, w] : fishes[i]) st_up.upd(1, 0, N + 1, j + 1, N + 1, st_up.qry(1, 0, N + 1, j) + val);
| ^~~
fish.cpp:39:47: error: 'struct SegmentTree' has no member named 'update'
39 | for (auto [j, w] : fishes[i]) st_down.update(1, 0, N + 1, 0, j - 1, st_down.qry(1, 0, N + 1, j) + val);
| ^~~~~~
fish.cpp:39:107: error: 'val' was not declared in this scope
39 | for (auto [j, w] : fishes[i]) st_down.update(1, 0, N + 1, 0, j - 1, st_down.qry(1, 0, N + 1, j) + val);
| ^~~
fish.cpp:41:15: error: 'struct SegmentTree' has no member named 'update'
41 | st_up.update(1, 0, N + 1, 0, N + 1, d_res);
| ^~~~~~
fish.cpp:42:17: error: 'struct SegmentTree' has no member named 'update'
42 | st_down.update(1, 0, N + 1, 0, N + 1, till_now);
| ^~~~~~