fish.cpp: In member function 'long long int segtree::get(int, int, int, int, int)':
fish.cpp:58:65: error: no matching function for call to 'max(long long int)'
58 | get(2 * v + 1, tm + 1, tr, max(l, tm + 1), r));
| ^
In file included from /usr/include/c++/10/vector:60,
from fish.h:1,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: template argument deduction/substitution failed:
fish.cpp:58:65: note: candidate expects 2 arguments, 1 provided
58 | get(2 * v + 1, tm + 1, tr, max(l, tm + 1), r));
| ^
In file included from /usr/include/c++/10/vector:60,
from fish.h:1,
from fish.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: template argument deduction/substitution failed:
fish.cpp:58:65: note: candidate expects 3 arguments, 1 provided
58 | get(2 * v + 1, tm + 1, tr, max(l, tm + 1), r));
| ^
In file included from /usr/include/c++/10/algorithm:62,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: template argument deduction/substitution failed:
fish.cpp:58:65: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
58 | get(2 * v + 1, tm + 1, tr, max(l, tm + 1), r));
| ^
In file included from /usr/include/c++/10/algorithm:62,
from fish.cpp:3:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: template argument deduction/substitution failed:
fish.cpp:58:65: note: mismatched types 'std::initializer_list<_Tp>' and 'long long int'
58 | get(2 * v + 1, tm + 1, tr, max(l, tm + 1), r));
| ^
fish.cpp: At global scope:
fish.cpp:65:36: error: expected ',' or '...' before 'X'
65 | ll max_weights(int N, int M, int[] X, int[] Y, int[] W) {
| ^
fish.cpp: In function 'long long int max_weights(int, int, int*)':
fish.cpp:69:9: error: 'X' was not declared in this scope
69 | X[i]++; Y[i]++;
| ^
fish.cpp:69:17: error: 'Y' was not declared in this scope
69 | X[i]++; Y[i]++;
| ^
fish.cpp:70:29: error: 'W' was not declared in this scope
70 | pos[X[i]].pb({Y[i], W[i]});
| ^
fish.cpp:93:21: error: 'dp' was not declared in this scope; did you mean 'dp2'?
93 | if (i >= 2) dp[i][0] = max(dp1[i][0], dp1[i - 2][0] + pos[i][0].sc);
| ^~
| dp2
fish.cpp:96:29: error: 't' was not declared in this scope
96 | for (int j = 0; j < t; j++) {
| ^
fish.cpp:104:22: error: 't' was not declared in this scope
104 | for (int j = t - 1; j >= 0; j--) {
| ^
fish.cpp:116:1: warning: no return statement in function returning non-void [-Wreturn-type]
116 | }
| ^